[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? |
[MODM-164] DocumentPersister's prepareQuery() method is not suitable for preparing newObj for update queries Created: 05/Apr/12 Updated: 05/Apr/12 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | Persister |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Juha Suni | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Doctrine\ODM\MongoDB\Query\Expr::getNewObj() uses Doctrine\ODM\MongoDB\Persisters\DocumentPersister::prepareQuery() method for preparing newObj. However, prepareQuery is not suitable for that. The first lines in prepareQuery method should apply to find queries only: if (is_scalar($query) || $query instanceof \MongoId) { Recommendation: DocumentPersister should introduce a new method, such as prepareNewObj($newObj) for preparing the newObj array. Expr::getNewObj() should be change to invoke the new method. |
[MODM-137] Undefined index 'criteria' in DocumentPersister Created: 04/Apr/11 Updated: 04/Apr/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: | Kevin Bradwick | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
On the master branch, a notice is thrown on line 531 of the DocumentPersister for an undefined index 'criteria'. This is when using the Yaml driver. Full notice: Warning: array_merge(): Argument #2 is not an array in /Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php on line 532 Catchable fatal error: Argument 1 passed to Doctrine\MongoDB\Collection::find() must be an array, null given, called in Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php on line 533 and defined in /Doctrine/MongoDB/Collection.php on line 169 |
[MODM-170] Unique index on embedded document Created: 15/May/13 Updated: 15/May/13 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | Persister |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Szymon Karnecki | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, Bug checked on versions: I've created unique index on embedded document and ODM seem not to be working properly. When unique index is violated MongoCursorException is thrown and this behavior is desired. Thrown exception: Grid document sketch: { _id: boxes:[DBref(Offer), DBref(Offer), DBref(Offer)] tag: DBref(Tag) }unique index on boxes.tag Any help would be appreciated. |
[MODM-163] @ReferenceMany and Inheritance Created: 01/Mar/12 Updated: 01/Mar/12 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | Persister |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | julie sommerville | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
php 5.3 macosx 10.7.3 mongodb-odm 1.0 mongodb v2.0.2 |
||
| Description |
|
@ReferenceMany doesn't seem to work when used within a child class unless I specify @InheritanceType("CLASS_PER_COLLECTION") (which is fine b/c that works for our architecture) Here is an example from our code: //Parent Class use Doctrine\Common\Collections\ArrayCollection; /**
//** References
} //Child Class
If I don't add the @InheritanceType annotation the $more_touts data never gets persisted into the DB. |