This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Doctrine2 CouchDB ODM utility entity repositories

dev-master 2017-10-30 22:13 UTC

This package is auto-updated.

Last update: 2021-06-15 04:39:43 UTC


PHP version Latest Version License

Build Status Style Check Code Quality Code Coverage

Total Downloads Monthly Downloads


Doctrine2 CouchDB ODM utility entity repositories

Important notice

This package is currently broken due to Doctrine\ODM\CouchDB\DocumentRepository::refresh being defined as final. This is a situation impossible to be solved by this package that makes it unusable. I've not time nor especial interest in supporting this package, feel free to fork.



composer require juliangut/doctrine-couchdb-odm-repositories


Use repositoryClass on mapped classes

 * Comment CouchDB document.
 * @ODM\Document(repositoryClass="\Jgut\Doctrine\Repository\CouchDBRepository")
class Comment

Register factory on managers

When creating object managers you can set a repository factory to create default repositories such as follows

use Jgut\Doctrine\ManagerBuilder\CouchDB\DocumentManager;
use Jgut\Doctrine\Repository\Factory\CouchDBRepositoryFactory;

$documentManager = DocumentManager::create([], new \Doctrine\ODM\CouchDB\Configuration);
$documentManager->setRepositoryFactory(new CouchDBRepositoryFactory);

For an easier way of registering repository factories and managers generation in general have a look at juliangut/doctrine-manager-builder


Head to juliangut/doctrine-base-repositories for a full list of new functionalities provided by the repository


Due to the lack of a Query Builder such as the ones present in Doctrine ORM and Doctrine MongoDB ODM the paginating and counting operations are vastly inefficient as they need the whole set loaded in memory


Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before.



See file LICENSE included with the source code for a copy of the license terms.