Reputation: 3860
I don't know what's the problem but when I run this code
$reposit = $this->get('doctrine_mongodb')
->getManager()
->getRepository('ngNearBundle:Markers');
$l=$reposit->findBy(array('lat'=>'35.691048'));
it returns a Doctrine\ODM\MongoDB\LoggableCursor object and not the mongodb document ! what should the problem be ?
Upvotes: 2
Views: 1331
Reputation: 1847
The findBy()
method return a collection of all matching results. If you want to get only one result, use findOneBy()
method.
Upvotes: 1