Sunday 18 August 2013

Doctrine 2 base entities like those in doctrine 1?

Doctrine 2 base entities like those in doctrine 1?

I'm starting a new project with Symfony2/Doctrine2 and I generated my
entities from the DB with the mapping:convert and mapping:import commands.
My entities are fine, but I only have the generated entities. Back in
Doctrine1/Symfony1, you had your entities generated twice : once in the
doctrine folder, an almost empty class just extending the second one in
doctrine/base folder where all the doctrine internals were
(getters/setters, fields...) This way, you could add your own methods in
the first file where they remained untouched even if you generated again
the entities (only the doctrine/base files were modified by the
generator).
Am I missing something ?

No comments:

Post a Comment