[MODM-153] "Near" Query does not work. Created: 10/Aug/11 Updated: 20/Feb/12 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Dmitry | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
"Near" statement does not work for me. The following code returns all cities from collection: $cities = $this->dm->createQuery('City')
->field('coordinates')->near(50, 60)
->execute();
Could you please fix it? |
| Comments |
| Comment by mark wright [ 02/Sep/11 ] |
|
It also does not work in beta3 but it fails differently. It never returns anything. $places = $documentManager->createQueryBuilder('Documents\Place') This returns 0 documents even though I have a point at 36.5788493, -121.7207805. Doctrine\MongoDB\Query\Builder::near() only takes one argument so the Y value is ignored. However, the docblock specifies 2 params. |
| Comment by Tim Sakharchuk [ 04/Sep/11 ] |
|
Hi All, Here is correct realization of this function in public function near($x, $y) { $this->query['type'] = Query::TYPE_GEO_LOCATION; $this->query['near'] = array($x, $y); return $this; }When may this fix appear in Doctrine ODM? Thanks! |
| Comment by Shane A. Stillwell [ 20/Feb/12 ] |
|
I had the same issue on 1.0.0.BETA3. The solution was to change the query up a little. $places = $this->dm->createQueryBuilder('\Application\Event')->field('latitude')->near(50)->field('longitude')->near(60)->getQuery()->execute();
|
[MODM-141] Doctrine ODM: Documentation error Created: 26/Apr/11 Updated: 26/Apr/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Major |
| Reporter: | Diego Lewin | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
not applicable |
||
| Description |
|
I think that is a documentation issue, in http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html (15.3. Modifier Operations) the queries are like: $dm->createQueryBuilder('User') ->getQuery() But it is missing the update(), it should be like: $dm->createQueryBuilder('User') ->update() ->getQuery() All the queries in that section have similar issue |
[MODM-138] Field's name attribute does not work for the update queries Created: 07/Apr/11 Updated: 07/Apr/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Başar Aykut | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Documents class Test
{
.
.
.
/**
* @EmbedOne(targetDocument="Location", name="l")
*/
private $location;
.
.
.
}
/** @EmbeddedDocument */
class Location
{
/**
* @Field(type="float", name="y")
*/
public $lat;
/**
* @Field(type="float", name="x")
*/
public $lng;
public function __construct($latitude,$longitude) {
$this->lat = $latitude;
$this->lng = $longitude;
}
}
Update query: $dm->createQueryBuilder('Test')
->update()
->field('id')->equals(123)
->field('l')->set(new Location(39, 32);
->getQuery(array('upsert' => true))
->execute();
Result of this query is "l": { "lat": 39, "lng": 32 }, however, it should be "l": { "y": 39, "x": 32 }, also field function can support field name of the class on update queries, as follows $dm->createQueryBuilder('Test')
->update()
->field('id')->equals(123)
->field('location')->set(new Location(39, 32);
->getQuery(array('upsert' => true))
->execute();
|
[MODM-128] Upserts in Query builder 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: | Bug | Priority: | Major |
| Reporter: | Billy Bob | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Mac OS X + MAMP |
||
| Description |
|
It seems that if you just call upsert(true) in a update request, it won't be enough. You have to calm getQuery(array('upsert' => true)) as well in order to have the 'insert if not exist' working. |
[MODM-129] Storing embeded documents containing embeded documents, already persistet in another collection fails Created: 25/Feb/11 Updated: 25/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Kolja Treutlein | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
We persist a document a1 containing an embedded document a1.1 which itself contains another embedded document a1.1.1. When the embedded document a1.1 is moved to another document of another collection b1 and needs to get persisted as embedded document b1.1 the embedded document a1.1.1 (which is now part of b1.1, too) is not saved as an embedded document of b1.1. Example: We use a version object which contains a pageversion as an embedded document. This page object contains multiple elements (stored as embedded documents) which themselves contain several parameter objects (stored as embedded document of elements). Now assume we have such a persisted version and want to "copy" the pageversion in another collection. So we generate a new page object, and add to this page all elements of the persisted pageversion. If we now persist this page, the representation in mongodb contains all elements but not any parameters, which should be part of the page as well (as they are part of an element). |
| Comments |
| Comment by Kolja Treutlein [ 25/Feb/11 ] |
|
Testcase |
| Comment by Jonathan H. Wage [ 25/Feb/11 ] |
|
Try cloning the embedded document when you move it. The reason why you have issues most likely is because internally inside Doctrine we keep track of each embedded document instance and what parent document it is attached to. So when you move it, Doctrine gets confused. You need to move it by cloning so the embedded document is actually a new object instance to Doctrine. |
[MODM-157] Github-PR-151 by l3pp4rd: fixes triggering fatal error on preupdate event in case changeset is clea Created: 25/Aug/11 Updated: 19/Sep/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of {username}: Url: https://github.com/doctrine/mongodb-odm/pull/151 Message: fixes triggering fatal error on preupdate event in case changeset is cleared during onFlush similar issue is fixed in ORM it should be supported on ODM mongodb also |
| Comments |
| Comment by Dmitry Strygin [ 19/Sep/11 ] |
|
Hmm... The bug is still actual for ORM layer in master. |
| Comment by Vladimir Garvardt [ 19/Sep/11 ] |
|
Got the same issue for ORM in 2.1.1 and same in master. Made a fix based on fix for ODM and pull request on github. URL: https://github.com/doctrine/doctrine2/pull/126 PS: maybe new issue should be created in Doctrine 2 - ORM project for this issue |
[MODM-156] Github-PR-152 by vladar: Property ClassMetadata::file is not serialized Created: 25/Aug/11 Updated: 25/Aug/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of {username}: Url: https://github.com/doctrine/mongodb-odm/pull/152 Message: This is causing errors, when saving gridfs files with persistent metadata cache engine (like apc, memcached, etc). I've also found same bug in Jira - http://www.doctrine-project.org/jira/browse/MODM-132 but seems that it is not fixed yet. Added fix + tests. |
[MODM-154] Github-PR-150 by tecbot: [XMLDriver] fixed an error in hydration classes when the name is not equal to the fieldName Created: 21/Aug/11 Updated: 21/Aug/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of {username}: Url: https://github.com/doctrine/mongodb-odm/pull/150 Message: |
[MODM-155] Github-PR-148 by roed: fixed generating of classes Created: 21/Aug/11 Updated: 21/Aug/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of {username}: Url: https://github.com/doctrine/mongodb-odm/pull/148 Message: fixed the generating of classes based on xml files, changed ClassMetadata to ClassMetadataInfo in these files (as in the ORM tool/mapping) the following did not work, but works after these changes: $metadatas = $cmf->getAllMetadata(); //this would break it // $this->_dm is an instance of Doctrine\ODM\MongoDB\DocumentManager |
[MODM-162] Introduction Tutorial,suitable version Created: 15/Feb/12 Updated: 15/Feb/12 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Major |
| Reporter: | Hugues Leunsa | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
software |
||
| Description |
|
HI all, I am working on a project where I would like to use mongoDB ODM. But while following this tutotorial : http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/introduction.html, it appears to me that the download odm library doesn't work with the code: missing code or undefined classes. Therefore I woulld like to know what's the corresponding version mongodb ODM of the tutorial. Thank's in advance regards near |
[MODM-136] Document's fields names are not properly converted to database names in a query Created: 27/Mar/11 Updated: 27/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Eugene Leonovich | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Description |
|
Mappings: /** * @Field(type="date", name="scheduled_at") */ private $scheduledAt; /** * @Field(type="date", name="completed_at") */ private $completedAt; Query: $qb->field('scheduledAt')->lte($now)
->addOr($qb->expr()->field('completedAt')->lte($now))
->addOr($qb->expr()->field('completedAt')->equals(null))
->sort('scheduledAt', 'asc');
Expected result: db.foo.find({
"scheduled_at": { "$lte": new Date(...) },
"$or": [
{ "completed_at": { "$lte": new Date(...) } },
{ "completed_at": null } ]
})
.sort({ "scheduled_at": 1 });
Actual result: db.foo.find({
"scheduled_at": { "$lte": new Date(...) },
"$or": [
{ "completedAt": { "$lte": new Date(...) } },
{ "completedAt": null } ]
})
.sort({ "scheduledAt": 1 });
|
[MODM-134] Reference added twice Created: 24/Mar/11 Updated: 25/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | jules b | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I have a listener who listens on onFlush event, If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine. Here's my document (notice references added twice on children property): array ( EDIT: if i clear() the $children ArrayCollection before calling $uow->recomputeSingleDocumentChangeSet() all is fine I tried to reproduce it in a test-case but the result wasn't successful |
[MODM-131] Notice in Doctrine\MongoDB\GridFS::doInsert Created: 09/Mar/11 Updated: 09/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Vitaliy Kaplich | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 5.5, PHP 5.3 |
||
| Description |
|
Notice: Undefined variable: file in /projects/tbi/vendors/doctrine/odm/lib/vendor/doctrine-mongodb/lib/Doctrine/MongoDB/GridFS.php on line 112 |
[MODM-135] [Cursor] ReferenceMany sort mapping not working Created: 25/Mar/11 Updated: 26/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine MongoDB ODM |
| Component/s: | None |
| Affects Version/s: | 1.0.0BETA3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | jules b | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Macosx |
||
| Attachments: |
|
| Description |
|
I have a document like this: /** @Document */ /** @ReferenceMany(sort= {"order"="asc"}) */ If i have well understood things, i can do: $blocks = $dm->getRepository('Page') blocks should now be sorted by $order property. This behaviour doesn't seems to work (or maybe i'm missing something). i made the priority major because in my case i haven't found a workaround (i'm using nested referenceMany, a child can have children, which can have children, ..). |
[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-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 |
[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. |