mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Custom entity generator templates #5514
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @szymach on GitHub (May 1, 2017).
Originally assigned to: @Ocramius on GitHub.
Hello,
I have a question - would you consider adding an option to provide custom class templates for the entity generator?
@Ocramius commented on GitHub (May 1, 2017):
We are actually in the process of dropping the entity generator, which
should be moved either out of the organisation or maintained by third
parties as a separate optional component. We definitely won't add features
to it.
On 1 May 2017 2:27 p.m., "Piotr Szymaszek" notifications@github.com wrote:
@szymach commented on GitHub (May 1, 2017):
OK ;_;
@Ocramius commented on GitHub (May 1, 2017):
@szymach to give you some more background, the entity generator is ABused 90% of the time to generate entities over and over, making the usage of the ORM moot. At that point, it's better to use a record abstraction library, instead of a data mapper.
@szymach commented on GitHub (May 1, 2017):
I simply like writing YAML mapping and then generate classes out of them. I had to always adjust the generated files, so I was wondering if it could be modified. I can do without, anyway, was just curious.
@Ocramius commented on GitHub (May 1, 2017):
@szymach the process should be the opposite: mappings to be written AFTER the entities were DESIGNED.
Entity generation is overall an anti-pattern that leads to extremely anemic domain-related code.
The idea of the generator has always been to allow quick migration from legacy/existing databases: nothing more than that.
@szymach commented on GitHub (May 1, 2017):
OK I understand.