Caused by: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on com.apidoc.entity.APIOne.APIGroup references an unknown entity: com.apidoc.entity.APIGroup at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:109) at org.hibernate.cfg.Configuration.processEndOfQueue(Co...
使用Hibernate进行自关联时@ManyToOne 定义的类型Order是接口,需要显示指定实现类 @ManyToOne(fetch=FetchType.LAZY,targetEntity = OrderImpl.class,cascade =CascadeType.MERGE) @JoinColumn(name="PARENT_ORDER_ID")privateOrder parent;
hibernate的映射关系,需要有主外键来关联维护,因为你这个地方的 OneToOne or @ManyToOne没有定义主外键,所以会报这个错误。
正如错误提示的那样,您正在对anohter实体中的non-persistent类型进行注释(引用)。
根据异常来看,是你在没有正确配置好实体类的路径,org.book.bean.BCompany 是未知的实体类,这个路径应该是<mapping class="org.book.bean.Book.bcompany" /> 认真检查一下吧。应该是路径问题。
你也可以连接表,使航班_飞机表。注解飞行中-〉@ManyToOne@JoinColumn(name="aircraft_id")
@ManyToOne...class User {class Coordinate { ... }Caused by: org.hibernate.AnnotationException: @OneToOne or @ManyToOneon com.redex.model.Photo.labelledIn references an unknown entity: java.util.Ma 浏览2提问于2012-06-13得票数 1 回答已采纳 ...
org.hibernate.AnnotationException: @OneToOne or @ManyToOne on com.demo.pojo.dxwj.Students.cardId references an unknown entity: com.demo.pojo.dxwj.IdCard at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:107) at org.hibernate.cfg.Configuration.processEndOfQueue(Configuration...
testSchemaExport(com.demo.pojo.dxwj.TestStudent) org.hibernate.AnnotationException: @OneToOne or @ManyToOne on com.demo.pojo.dxwj.Students.cardId references an unknown entity: com.demo.pojo.dxwj.IdCard at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:107) ...
Caused by: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on org.ppbni.splatter.model.KodePos.kode_korwil references an unknown entity: java.lang.String at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:107) at org.hibernate.cfg.Configuration.processEnd...