Hibernate 异常:“@OneToOne or @ManyToOne on XXX references an unknown entity: XXX”
使用Hibernate进行自关联时@ManyToOne 定义的类型Order是接口,需要显示指定实现类
@ManyToOne(fetch=FetchType.LAZY, targetEntity = OrderImpl.class, cascade = CascadeType.MERGE) @JoinColumn(name="PARENT_ORDER_ID") private Order parent;