couchdb-odm icon indicating copy to clipboard operation
couchdb-odm copied to clipboard

DocumentRepository::findBy(array('id' => '')) returns empty result

Open frne opened this issue 12 years ago • 0 comments

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

frne avatar Oct 30 '13 19:10 frne