org.hibernate.hql.ast.QuerySyntaxException with Hibernate

后端 未结 7 2164
死守一世寂寞
死守一世寂寞 2021-02-20 01:34

I\'m new to using Hibernate with Java. I\'m getting the following exception. The stuff that I found online regarding this error didn\'t seem to help. Any ideas? The Exception:<

7条回答
  •  野的像风
    2021-02-20 01:45

    Try adding a class element under persistence-unit, in your persistence.xml file.

    
    
    
        
            com.icesoft.icefaces.samples.datatable.jpa.ApplPerfStats
            ...
         
    
    

    I haven't done much more than that with JPA/EntityManager, so I don't know if there's a way to add an entire package. AFAIK, when using hibernate.cfg.xml, each persistent class has to be specified directly.

提交回复
热议问题