[DDC-3413] Types are always ignored when performing a one to many statement Created: 26/Nov/14 Updated: 12/Mar/15
|Project:||Doctrine 2 - ORM|
|Reporter:||Edouard COLE||Assignee:||Benjamin Eberlei|
BasicEntityPersister#getOneToManyStatement() is building an array named $criteria. This array is built this way:
This means this array is indexed by keys looking like that:
But the function BasicEntityPersister#expandParameters() is used in this function, and this function is NOT able to handle SQL field name as keys, but PHP attributes, because it uses BasicEntityPersister#getType() which is doing this:
I think the $criteria array should be used to call BasicEntityPersister#getSelectSQL(), but another array should be passed to expandParameters. Here is a potential fix:
And $cleanCriteria should be passed to expandParameters.
|Comment by Marco Pivetta [ 27/Nov/14 ]|
Edouard COLE I suggest you to open a pull request with a failing test case, otherwise this issue is hard to follow/understand.
|Comment by Edouard COLE [ 12/Mar/15 ]|
I think this issue is fixed since https://github.com/doctrine/doctrine2/commit/ce446a6f033ca46fc65911e6f40299336ddace74