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

entity 必须要有 @Id 注解才能不报错 #340

Open
KaseiHaku opened this issue May 18, 2024 · 0 comments
Open

entity 必须要有 @Id 注解才能不报错 #340

KaseiHaku opened this issue May 18, 2024 · 0 comments

Comments

@KaseiHaku
Copy link

场景:
有一个 BaseEntity 包含所有表的必须 字段,其中就有 id 字段,其他所有 Entity 继承 BaseEntity,
Mybatis-Flex 直接报错,Mybatis-Plus 如果没有指定 id 默认取 id 字段作为主键

[!修改建议]
@Table 中增加一个属性,用于配置不在当前 class 中的字段作为主键

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

1 participant