摘要:
这个错误有点小小的纠结.想都没想就写的,,其实错误的原因就在我在映射实体的时候@ManyToOne@ Column(name="parent_id") public Module getParent() { return parent; }注意上面的 @ Column(name="parent_id")应该改为@JoinColumn(name="parent_id")就OK了 阅读全文
摘要:
Husband.javapackagecom.one2one.bean;importjavax.persistence.CascadeType;importjavax.persistence.Column;importjavax.persistence.Entity;importjavax.persistence.GeneratedValue;importjavax.persistence.GenerationType;importjavax.persistence.Id;importjavax.persistence.OneToOne;importjavax.persistence.Tabl 阅读全文