原因:实体类继承了ID,但是ID没有被映射到。
在此java类中加入@ID方法,会报错,会重复。
解决办法:
Windows->Persistence->Java Persistence->JPA->Errors/Warnings->Type, 将“Entity has no primary key”设为警告或更低的提示级别。
[eclipse常见问题]The entity has no primary key attribute defined
最新推荐文章于 2024-06-30 13:24:02 发布