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

后端 未结 9 1141
梦如初夏
梦如初夏 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:25

    You need to create a persistence file and a ORM mapping file for JPA, refer the mapping file from persistence file.

    
        org.datanucleus.api.jpa.PersistenceProviderImpl
        META-INF/hbase-orm.xml
        com.xxx.logcollector.entity.DefaultLogableEntity
        
            
            
    

    ....

    Create ORM mapping file

    
        
            
                
                    
                
                
                    
                
    
    
    

    ...

    Create entity manager in spring

    
        
    

    提交回复
    热议问题