[MODM-159] Querying a collection by Embedded objects identifier not working. Created: 30/Nov/11 Updated: 30/Nov/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | Persister |
| Affects Version/s: | 1.0.0BETA3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Dahuda Unal | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
OS:10.8.0 OSX |
||
| Description |
|
Reference objects identifiers are stored as '$id' in database when Embedded objects identifiers are stored as '_id'. When querying a collection by embedded objects identifier, DocumentPersister->prepareQueryValue() converts it to '$id' although it is stored in DB as '_id'. So querying for reference object ids work but embedded objects do not. DocumentPersister->prepareQueryValue() first checks if field has TargetDocument mapping, if it is true it checks if field is target document's identifier, if this also returns true Is this a bug / issue or am i missing something? |