, (*1)
, (*2)
, (*3)
doctrine-couchdb-odm-repositories
Doctrine2 CouchDB ODM utility entity repositories, (*4)
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., (*5)
Installation
Composer
composer require juliangut/doctrine-couchdb-odm-repositories
Usage
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, (*6)
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, (*7)
Functionalities
Head to juliangut/doctrine-base-repositories for a full list of new functionalities provided by the repository, (*8)
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, (*9)
Contributing
Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before., (*10)
See file CONTRIBUTING.md, (*11)
License
See file LICENSE included with the source code for a copy of the license terms., (*12)