I successed to integrate Doctrine 2 and Zend Framework using a Doctrine2 Application Resource and it works great, cli and web, but I couldn't find any informations on how structure my models.
Right now, here is my workflow:
- I write my entities in models/Entities using Annotation Driver
- I generate entities with
php bin/doctrine orm:schema-tools:create
This part overrides my Entities with public setters and getters
But I'm struggling here.
I'm not sure on how Entities should be used.
should it looks like this :
application/
- models/
-- Entities/
--- Product.php
--- Category.php
-- Proxies/
--- Product.php
--- Category.php
-- Repositories/
--- Product.php
--- Category.php
Is it correct or Am I totally wrong?
By the way, when are used both Proxies & Repositories ? I can't find relevant documentation about them.
If you know where I can find an actual Doctrine 2 project, or better an actual Zend Framework + Doctrine 2 Project it'll be great.
Thanks for your help.