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

请问MyBatis-Spring-Boot实体类必须和表名对应吗 #145

Open
guoliang3 opened this issue Oct 23, 2018 · 1 comment
Open

请问MyBatis-Spring-Boot实体类必须和表名对应吗 #145

guoliang3 opened this issue Oct 23, 2018 · 1 comment

Comments

@guoliang3
Copy link

//@alias("announcementIndex")
@table(name = "announcement")
@DaTa
@EqualsAndHashCode(callSuper = true)
//@entity(name = "announcement")
public class AnnouncementIndex

表名 是 announcement
实体 是 AnnouncementIndex

我必须把实体AnnouncementIndex改成 Announcement 和表名一样才不会报错

其他的都没问题 ,之前用springmvc 也没发现问题

现在改boot就有这个问题了 求助.................

Example example = new Example(class); 这里面的class 必须要和表名一样嘛 我看他是getclass 难道是获取类名嘛?

@guoliang3
Copy link
Author

上面有点啰嗦 总结一下 就是 实体类 是不是必须和 表名一样

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