Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why doesn't it support generating controllers and services? #1061

Closed
courage0916 opened this issue Sep 8, 2023 · 1 comment
Closed

Why doesn't it support generating controllers and services? #1061

courage0916 opened this issue Sep 8, 2023 · 1 comment

Comments

@courage0916
Copy link

Some simple business scenarios not only require POs and mappers, but also require the generation of controllers and services.Moreover, if the VO, POs, and DTO model strateqies are followed, there is also the need to generate VOs, POs, and DTOs. lt istroublesome to repeatedlv do highly coup ed thinas, sn't mab born precisely because it helps with deve opment? Why not trv togenerate more things? Are there any concerns?

@jeffgbutler
Copy link
Member

I wrote an explanation about this years ago: https://mybatis.org/generator/philosophy.html

If you are recreating POs, VOs, DTOs, *Os, etc. that match the generated record classes it seems like a waste of time to me - just use the generated objects.

If instead you are mapping tables to a rich domain model, then you are thinking about relationships between tables and transactions. That is beyond the capabilities of the generator.

Nonetheless, if you think it is possible to generate such items for your use, then you could write a plugin to generate these additional items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants