Custom entity generator templates #5514

Closed
opened 2026-01-22 15:09:36 +01:00 by admin · 6 comments
Owner

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?

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?
admin added the New FeatureWon't FixQuestion labels 2026-01-22 15:09:36 +01:00
admin closed this issue 2026-01-22 15:09:37 +01:00
Author
Owner

@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:

Hello,
I have a question - would you consider adding an option to provide custom
class templates for the entity generator?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/doctrine/doctrine2/issues/6418, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakPBvKGbCHJnTVtueBqlvF8p5YQ7Wks5r1c-hgaJpZM4NNAqc
.

@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: > Hello, > I have a question - would you consider adding an option to provide custom > class templates for the entity generator? > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/doctrine/doctrine2/issues/6418>, or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAJakPBvKGbCHJnTVtueBqlvF8p5YQ7Wks5r1c-hgaJpZM4NNAqc> > . >
Author
Owner

@szymach commented on GitHub (May 1, 2017):

OK ;_;

@szymach commented on GitHub (May 1, 2017): OK ;_;
Author
Owner

@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.

@Ocramius commented on GitHub (May 1, 2017): @szymach to give you some more background, the entity generator is **AB**used 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.
Author
Owner

@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.

@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.
Author
Owner

@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.

@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.
Author
Owner

@szymach commented on GitHub (May 1, 2017):

OK I understand.

@szymach commented on GitHub (May 1, 2017): OK I understand.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5514