mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1832: register<DATATYPE>Function methods missing from \Doctrine\ORM\Query\Parser #2311
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 (May 22, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user awesome:
The example in the documentation at http://docs.doctrine-project.org/projects/doctrine-orm/en/2.0.x/reference/dql-doctrine-query-language.html#adding-your-own-functions-to-the-dql-language specifies that custom functions should be registered using \Doctrine\ORM\Query\Parser::registerNumericFunction() this method (or methods for other datatypes) does not seem to exist anywhere. I would fork and add these methods but I am not sure if they were there and were removed or whether they just got lost.
ta.
To reproduce simply call:
\Doctrine\ORM\Query\Parser::registerNumericFunction('name', 'class');
Boom!
Chris
@doctrinebot commented on GitHub (May 27, 2012):
Comment created by @beberlei:
Please check the 2.2 documentation, this was changed from 2.0 to 2.2
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#adding-your-own-functions-to-the-dql-language
@doctrinebot commented on GitHub (May 28, 2012):
Comment created by awesome:
The 2.2 documentation seems to be identical and still references \Doctrine\ORM\Query\Parser::registerNumericFunction (which does not exist). Should this bug be in documentation?
@doctrinebot commented on GitHub (May 28, 2012):
Comment created by @beberlei:
Oh yes below there, but see above:
@doctrinebot commented on GitHub (May 28, 2012):
Comment created by awesome:
Yes, I see that. It's just ambiguous, I will use the method described but the documentation should be corrected to stop somebody like myself tearing their hair out :P.
@doctrinebot commented on GitHub (Jul 4, 2012):
Comment created by @beberlei:
Fixed
@doctrinebot commented on GitHub (Jul 4, 2012):
Issue was closed with resolution "Fixed"