mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2290: Infer custom Types from the field for query parameters #2876
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 (Feb 8, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user mnapoli:
When using a mapping Type that declares
convertToDatabaseValue, the method is not always called in queries.Example:
(with
entity.fieldbeing of custom type 'the_mapping_type')Type::convertToDatabaseValue()is correctly called when using:But it is not called when using:
which gives a query that returns invalid results.
Like other mapping types in this situation, there is no reason the type is not inferred automatically from the field.
I have written a failing test case in Doctrine\Tests\ORM\Functional\TypeValueSqlTest:
@doctrinebot commented on GitHub (Feb 8, 2013):
Comment created by mnapoli:
See also http://www.doctrine-project.org/jira/browse/DDC-2224
@doctrinebot commented on GitHub (Feb 8, 2013):
Comment created by mnapoli:
The test is in this branch: https://github.com/myc-sense/doctrine2/tree/DDC-2290
@doctrinebot commented on GitHub (Oct 29, 2013):
Comment created by mnapoli:
The organization name has changed so the previous URL is a 404.
Here is the branch containing the failing testcase: https://github.com/myclabs/doctrine2/tree/DDC-2290
@doctrinebot commented on GitHub (Jan 28, 2014):
Comment created by benjamin:
Any news on this one? Also, I just noticed that it does not cover the original problem I've reported in DDC-2224: I was specifically talking about
convertToDatabaseValueSQL()and notconvertToDatabaseValue().My problem is that even when passing the third parameter
$type, it does not use the conversion function fromconvertToDatabaseValueSQL().Should we reopen DDC-2224?
@doctrinebot commented on GitHub (Mar 23, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1339] was unlabeled:
https://github.com/doctrine/doctrine2/pull/1339
@doctrinebot commented on GitHub (Mar 25, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1339] was assigned:
https://github.com/doctrine/doctrine2/pull/1339
@doctrinebot commented on GitHub (Mar 25, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1339] was merged:
https://github.com/doctrine/doctrine2/pull/1339
@kamazee commented on GitHub (Apr 23, 2016):
Lack of this feature seems to be the root cause of #4632