[MODM-169] Filter API is not unified between ODM and ORM Created: 10/Dec/12 Updated: 10/Dec/12 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | Document Manager |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Craig Marvelley | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, I'm implementing some functionality around filters which will ideally work for both ORM and ODM. The API for managing filters is different on `Doctrine\ORM\EntityManager` and `Doctrine\ODM\MongoDB\DocumentManager`, while the CouchDB implementation of ODM has no filter concept. For example, ORM EntityManager has getFilters(), hasFilters(), while ODM MongoDB DocumentManager has getFilterCollection(). I was wondering what your thoughts were on defining the filter API in an interface, to improve consistency when implementing cross-library functionality? Thanks, |
[MODM-168] Can't Use Custom Repository Class for Embedded Doc When Using YAML Driver Created: 29/Jul/12 Updated: 29/Jul/12 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Isaac Foster | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When using the Yaml driver the ClassMetadata generation process won't create and use the indicated custom repository class for an embedded document. From what I can see digging into the actual code, it will work when using the Annotations or XML drivers, but in the Yaml driver the call to setCustomRepositoryClass is inside of a conditional that only gets entered if the document type is 'document'. I'm not completely sure, but from what I can see elsewhere in the code, it looks like mapped superclasses should also be able to have a custom repository class, but can't when using the Yaml driver. So I reckon what would work would be to change the code as indicated below: <<EXISTING CODE>> } elseif ($element['type'] === 'mappedSuperclass') { $class->isMappedSuperclass = true; }elseif ($element['type'] === 'embeddedDocument') { $class->isEmbeddedDocument = true; }<<TO THIS>> |
[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. |
[MODM-145] QueryBuilder references() to does not support references on embedded objects' fields Created: 23/May/11 Updated: 25/Oct/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | Query Builder |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Jeremy Mikola | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
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: class UserRepository extends DocumentRepository { public function findByEmbeddedObjectReference(User $user) { return $this->createQueryBuilder() ->field('embeddedObject.user.$id')->equals($user->getId()) // ->field('embeddedObject.user')->references($user) ->getQuery() ->execute(); } } Using field()/equals() works fine as an alternative to references(), so there is no urgent need for this feature. |
| Comments |
| Comment by Nicolas Brignol [ 25/Oct/11 ] |
|
Hi It seems that we have a problem with the temporary solution proposed : obj->field('embedded.referenced.$id')->equals($reference->getId())
will generate the query without "$id". Did someone experience this issue ? |
[MODM-144] Bi-Directional References Feature Created: 18/May/11 Updated: 18/May/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jan Gantzert | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Zend Framework 1.11.6 |
||
| Description |
|
I cant´t reproduce the Bi-Directional References with my own example or the example of the documentation. BlogPost.php /** @Document */ /** @String */ /** @String */ /** @String */ /** @String */ /** @ReferenceMany(targetDocument="PostComment", mappedBy="post") */ PostComment.php /** @Document */ /** @String */ /** @String */ /** @String */ /** @String */ /** @String */ /** @ReferenceOne(targetDocument="BlogPost", inversedBy="comments") */ CommentController.php $comment1 = new PostComment(); $comment2 = new PostComment(); $comment3 = new PostComment(); $dm->persist($comment1); echo $post->id; /*$posts = $dm->createQueryBuilder('BlogPost') $post = $dm->getRepository('BlogPost')->find('4dd45739f563724c23000002'); Zend_Debug::dump($post); ------------------------ Anyway, I can´t get the Comments from the mongodb. Greetings tronga |
[MODM-130] @ChangeTrackingPolicy notation is ignored in @MappedSuperclass Created: 02/Mar/11 Updated: 02/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vitaliy Kaplich | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 5.5, PHP 5.3 |
||
| Description |
|
I am not sure if it's supposed to be that @MappedSuperclass document can define @ChangeTrackingPolicy for multiple documents but in fact it does not work. In other words in the case below: /**
/**
=================================================== class Chart
At the same time if to define ChangeTrackingPolicy in the Chart class instead of MappedDocument it works as expected. |
[MODM-127] Update queries : update() required ? Created: 23/Feb/11 Updated: 23/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA2 |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Billy Bob | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In the documentation exemples for update queries : it doesn't mention a update() function call any more in update queries. Did I miss something? |
[MODM-126] lessThanOrEq() renamed in lte() Created: 22/Feb/11 Updated: 22/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA2 |
| Fix Version/s: | 1.0.0BETA2 |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Billy Bob | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The lessThanOrEq() function referenced in the documentation does not exist ay more, it was replaced by lte(). http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html |