[MODM-125] Doctrine\ODM\MongoDB\MongoCollection::findOne does not invoke postFindOne event handlers doing query against MongoGridFS collection Created: 18/Feb/11  Updated: 04/Mar/11  Resolved: 04/Mar/11

Status: Resolved
Project: Doctrine MongoDB ODM
Component/s: Mongo, MongoCollection, MongoCursor
Affects Version/s: 1.0.0BETA2
Fix Version/s: 1.0.0BETA3

Type: Bug Priority: Major
Reporter: Vitaliy Kaplich Assignee: Jonathan H. Wage
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

CentOS, PHP 5.3



 Description   

subj

it happens because the code goes out of the function at line 334 in file
\Doctrine\ODM\MongoDB\MongoCollection.php
without invoking appropriate event handlers

thanks!



 Comments   
Comment by Vitaliy Kaplich [ 18/Feb/11 ]

And the same bug with Doctrine\ODM\MongoDB\MongoCollection::getDBRef method as well

Comment by Jonathan H. Wage [ 04/Mar/11 ]

Which version are you using? I don't see this behavior any longer. Can you confirm?

Comment by Jonathan H. Wage [ 04/Mar/11 ]

Also, getDBRef() notifies the pre/postGetDBRef events.

Comment by Jonathan H. Wage [ 04/Mar/11 ]

If you can still reproduce the issue can you provide a test case for us to run?

Comment by Vitaliy Kaplich [ 04/Mar/11 ]

I'm using 1.0.0BETA1

https://github.com/doctrine/mongodb-odm/blob/1.0.0BETA1/lib/Doctrine/ODM/MongoDB/MongoCollection.php

there is a "return" at line 338

so the function invoke "preFindOne" but not "postFindOne"

Generated at Fri Oct 31 18:41:16 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.