Must every Entity Bean be registered in persistence.xml?

人走茶凉 提交于 2019-12-04 01:34:44

As already written here is the solution:

Check you JPA project properties and be sure to select "Discover annotated classes automatically" in the "Persistent class management" section. Doing this should provide the correct validation for your use case.

Luca Basso Ricci

in jpa you have to compile a file called persistence.xml where you tell Hibernate which classes will be managed by your ORM.
Check this question and its accepted answer

It's possible when you created the project, you picked "JPA project" instead of "java Project". In case you don't see "Java Project", follow the "other" and under the wizard type "java" to see the "Java Project".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!