我有一个使用Hibernate进行数据持久化的应用程序,Spring在上面(为了更好地衡量)。抛出了以下异常:
class org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException :: Objectwith id: 1 was not of the specified subclass: A (Discriminator: null); nested exception is org.hibernate.WrongCla
我有一个使用判别器列与InheritanceType.JOINED映射的具体JPA实体超类,并有几个子类实体来扩展这个超类的附加属性。这种策略在数据库设计和Java类层次结构中都很好,但是HibernateJPA不允许这样做,并抛出一个WrongClassException,因为没有映射到鉴别器的子类:
Caused by: org.hibernate.WrongClassException: Object [id=entity-1] was not of the s
我正在使用Postgresql,Hibernate和SpringBoot。"Object [id=1] was not of the specified subclass [com.app.sportapp.entity.User] : Discriminator: player; nested exception is org.hibernate.Wro
您有一个票证和ticketresponse。硬件票证继承自票证。当执行ReadTicket方法时,我得到一个WrongclassException,说明如果有人能帮我,我会很高兴的mySessionFactory == null) var configuration = new Configuration().Configure("hibernate.cfg.xmlWhere(x => x.