-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Can typehandler be separated from mybatis? #3304
Comments
I cannot answer for others, but I think splitting a few things from the mybatis core making other modules would be a good improvement as we get a lot of requests for type handles we don't want to support but honestly we should. Me being a direct contributor, I even have type-handlers at work that should be in mybatis. So if others agree (2 or 3 others) then maybe that could happen. |
Thank you for your reply;If this can be done, it is indeed beneficial for expanding based on mybatis, although some changes are needed for mybatis。 |
What does "separate type handlers" mean? |
Just a suggestion,More friendly to open source frameworks based on MyBatis;I believe other open source projects also have similar requirements。 |
I have already open sourced a framework called "mybatis-mp" based on mybatis. My entity class annotations need to rely on mybatis' typehandler, and I hope the annotation module of "mybatis-mp" can be made smaller and less dependent, but the typehandler property depends on mybatis dependencies. I hope mybatis can extract the typehandler from mybatis and make it a small module. My open source address is:
https://github.com/mybatis-mp/mybatis-mp
@documented
@retention(RetentionPolicy.RUNTIME)
@target(ElementType.FIELD)
public @interface TableField {
Class> typeHandler() default UnknownTypeHandler.class;
......
}
Mybatis mp is currently very user-friendly:
Pager<SysUser> pager= QueryChain.of(sysUserMapper) .like(SysUser::getUserName,"abc") .paging(Pager.of(1));
The text was updated successfully, but these errors were encountered: