mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1213: Make Bit comparsion available #1522
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jun 17, 2011).
Jira issue originally created by user scyks:
When you go to compare Bit Values in MySQL Database you can do thiy by "&" or "|" If you do this with Doctrine 2 you got an exception like following:
Message: [Syntax Error] line 0, col 161: Error: Expected =, <, <=, <>, >, >=, != got '&'
So i fixed this problem for me:
Doctrine\ORM\Query\Parser:
Line 2633
Doctrine\ORM\Query\Lexer:
Line 53
Line 193
So, maybe you gonna ad this in next Release ;)
Thanks or your good Job
@doctrinebot commented on GitHub (Dec 19, 2011):
Comment created by @beberlei:
This issue is referenced in Github Pull-Request GH-230
https://github.com/doctrine/doctrine2/pull/230
@doctrinebot commented on GitHub (Dec 19, 2011):
Comment created by @beberlei:
Related Pull Request was closed: https://github.com/doctrine/doctrine2/pull/230
@doctrinebot commented on GitHub (Dec 19, 2011):
Comment created by @beberlei:
This issue is referenced in Github Pull-Request GH-231
https://github.com/doctrine/doctrine2/pull/231
@doctrinebot commented on GitHub (Dec 19, 2011):
Comment created by @beberlei:
Related Pull Request was closed: https://github.com/doctrine/doctrine2/pull/231
@doctrinebot commented on GitHub (Dec 19, 2011):
Comment created by @beberlei:
Fixed
@doctrinebot commented on GitHub (Dec 19, 2011):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Feb 9, 2012):
Comment created by historika:
I do miss this patch in the recently checked out 2.2 branch. Is there any reason, it was skipped, even if the fix-version here is still 2.2?
I really miss this feature and was unable to get it to work by applying it manually. The parser seems to have troubles applying my parameters :\
@doctrinebot commented on GitHub (Feb 9, 2012):
Comment created by @FabioBatSilva:
Hi Markus
The bit comparisons was been added as DQL functions,
Can you explain your problem ?
@doctrinebot commented on GitHub (Feb 9, 2012):
Comment created by historika:
Hi Fabio, thank you for the fast reply and the great Doctrine anyway!
My problem is the following:
I have an
@Entitycalled Picture with some columns and the followingNow I try to fetch entities from the database that satisfy some special bit mask in this
visibilityattribute by doing the following:The error reported is:
Please note: I applied the above patch by hand to the Doctrine 2.2 code. Before that I got an "expected = got '&'" exception in the query.
Am I wrong, if I look through the code and try to find the suggested lines from Ronald there? They aren't in the downloadable package and even not in the SVN, I checked out this morning from
http://svn.github.com/doctrine/doctrine2.git@doctrinebot commented on GitHub (Feb 9, 2012):
Comment created by @FabioBatSilva:
Hi Markus
The "&" and "|" is not available for database compatibilities
You should use the DQL function BIT_AND or BIT_OR
@doctrinebot commented on GitHub (Feb 9, 2012):
Comment created by historika:
Thanks a lot Fabio,
stupid me, sorry.
For completeness, I now use:
and seem to get past the critical part.
Now I can go on trying to get the project back to work with the new Doctrine 2.2 ;)
I know its worth the work ;)