Class “model.Address” is listed in the persistence.xml file but not mapped

后端 未结 9 1116
梦如初夏
梦如初夏 2020-12-24 11:59

I have created a JPA project. In that Eclipse displays the following error on the entity class.

Class \"model.Address\" is listed in the

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-24 12:39

    Any of the above didnt work.

    For anyone who is searching for the "Class xxxx is mapped, but is not included in any persistence unit" error in Eclipse or RAD:

    1. Right-click on the project and choose properties.
    2. Select JPA
    3. Select the radio button "Discover annotated classes automatically"
    4. OK and wait for the project to finish building.

    These steps worked for me.

提交回复
热议问题