couchdb-odm
couchdb-odm copied to clipboard
DocumentRepository::findBy(array('id' => '')) returns empty result
The findBy method of class Doctrine\ODM\CouchDB\DocumentRepository returns an empty result while searching for criteria id.
$documentManager = $this->container
->get('doctrine_couchdb.odm.default_document_manager');
$repository = $documentManager
->getRepository('ACME\FooBundle\CouchDocument\User');
var_dump(
$repository->find('9142249159baef526ebd78c088009861')
);
// returns expected result
var_dump(
$repository->findBy(
array('id' => '9142249159baef526ebd78c088009861')
)
);
// returns an empty array
// tested with CouchDB 1.4.0