-
Notifications
You must be signed in to change notification settings - Fork 13k
Allow custom mapper methods to initiate dynamic injection #3243
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
Conversation
@harawata Thoughts? Looks ok to me.
coveralls
commented
Sep 26, 2024
Adding a mapper method at runtime is not a good idea.
If you want to generate SQL dynamically, please use SQL provider.
Adding a mapper method at runtime is not a good idea. If you want to generate SQL dynamically, please use SQL provider.
hi @harawata The injection method provided by PR is an XML simulation injection method, which has more secure SQL protection, Performance may be better in ordinary simple crud situations,Every time the SQL Provider method is called, the SQL statement is regenerated, which may result in additional parsing time, especially for complex SQL generation logic. I hope to carefully consider my suggestion and provide an additional injection solution, which is not a bad thing for MyBatis itself.
Thank you for your reply
I'm sorry, but I still think this is a bad idea.
This dynamic injection method is the core principle of
mybatis-plus, and we hope that the officialmybatiscan adopt it, Thank you for checking