[MODM-145] QueryBuilder references() to does not support references on embedded objects' fields Created: 23/May/11 Updated: 25/Oct/11
|Project:||Doctrine MongoDB ODM|
|Reporter:||Jeremy Mikola||Assignee:||Jonathan H. Wage|
I noticed that the references() method does not support fields on embedded objects, as the argument to the preceding field() method will be passed into getFieldMapping() and trigger an exception. I suppose a solution would require multiple calls to getFieldMapping() in order to dive into the embedded object's class metadata.
To demonstrate, below is an example of a UserRepository class. The User document contains an embeddedObject that itself references another User:
Using field()/equals() works fine as an alternative to references(), so there is no urgent need for this feature.
|Comment by Nicolas Brignol [ 25/Oct/11 ]|
It seems that we have a problem with the temporary solution proposed :
will generate the query without "$id".
Did someone experience this issue ?