pokap / pool-dbm
Multiple dbm manager
Requires
- php: >=5.3.2
- doctrine/common: 2.4.*
- symfony/console: 2.*
- symfony/filesystem: 2.*
- symfony/yaml: 2.*
- twig/twig: 1.*
This package is not auto-updated.
Last update: 2022-02-01 12:24:23 UTC
README
Requires at least PHP 5.3.3 with Doctrine 2 library. Compatible PHP 5.4 too.
PoolDBM package support doctrine common. You should know that this is an additional layer. But for to limit potential performance lowering, the mapping does not use reflection. It only dispatch features to doctrine managers.
Compatibility
The composer.json
file in each branch indicates Doctrine2 compatibility.
Additionally, several tags are available:
1.2.x
for Doctrine 2.41.1.x
for Doctrine 2.31.0.x
for Doctrine 2.2
Next Improvement
Optimize request doctrine with relation. And adding tests with real dbm.
Usage
The package has several class in debug mode, use these classes during development of your application.
Example Pok\PoolDBM\ModelManagerDebug
check method parameter and class-metadata info.
Mapping:
<multi-model model="MultiModel\User" repository-class="Repository\UserRepository"> <model-reference manager="entity" field="dataId"> <reference manager="document" field="id" reference-field="id" /> <id-generator target-manager="document" /> </model-reference> <model manager="entity" name="Entity\User" repository-method="findByIds"> <field name="name" /> </model> <model manager="document" name="Document\User"> <field name="profileContent" /> </model> <relation-one field="address" target-model="MultiModel\Address"> <field-reference manager="document" field="addressUser" /> </relation-one> <!-- compatible can to be empty for all managers, or defines several managers --> <relation-many field="posts" target-model="MultiModel\Post" compatible="entity,document" /> </multi-model>