mouf / database.doctrine-orm-wrapper
This package contains wrapper classes that make Doctrine ORM easy to use in Mouf
Installs: 5 225
Dependents: 2
Suggesters: 0
Security: 0
Stars: 3
Watchers: 15
Forks: 7
Open Issues: 2
Type:mouf-library
Requires
- php: >=7.1
- doctrine/orm: ~2.7
- mouf/database.dao-interface: 2.*
- mouf/database.doctrine-dbal-wrapper: ~1.1
- mouf/database.patcher: ^2.3
- mouf/mouf-validators-interface: ~2.0
- mouf/utils.common.doctrine-annotations-wrapper: ~1.2
- mouf/utils.common.doctrine-cache-wrapper: ~1.0
- mouf/utils.constants.debug: ~1.0
- symfony/filesystem: ~2.1
Suggests
- mouf/database.patcher: Allows creating DB patches automatically on schema update
README
This package contains a single class that makes Doctrine/ORM easily usable in Mouf.
It provides an installer that creates an instance of EntityManager
.
The package also feature a special UI that will help you:
- install & edit interfaces to help the user defining the main properties of the
entityManager
instance. - automated DB Schema generation
- DAO (repository) generation that produce helpers for performing base queries
These steps are triggered during the install process, but also when lanching the configuration interface from the entityManager
instance dedicated button :
Finally, you will be able to update your DB Schema at all time using the menu entry in DB >> Doctrine >> Generate Schema and DAOs:
Approach: Doctrine allows multiple strategies to operate from DB Schema to it's Entities. In this package, we made the choice to work from Model down to DB Schema : you just define your entities, then use the
entityManager
and associatedschemaTool
in order to create / update your schema.
For more information, please read the next steps:
- Doctrine documentation is very important as this package is just a wrapper : http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/
- Defining properties for the
entityManager
instance - Create / Update your DB schema
- Generated DAO classes
- Writing packages that provide entities