2017 © Pedro Peláez
 

library doctrine-couchdb-odm-repositories

Doctrine2 CouchDB ODM utility entity repositories

image

juliangut/doctrine-couchdb-odm-repositories

Doctrine2 CouchDB ODM utility entity repositories

  • Monday, October 30, 2017
  • by juliangut
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHP version Latest Version License, (*1)

Build Status Style Check Code Quality Code Coverage, (*2)

Total Downloads Monthly Downloads, (*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)

Performance

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)

The Versions