加注解
one的一方
@OneToMany(mappedBy = "faq",fetch=FetchType.EAGER,targetEntity = FaqSub.class)
many的一方
@ManyToOne
加注解
one的一方
@OneToMany(mappedBy = "faq",fetch=FetchType.EAGER,targetEntity = FaqSub.class)
many的一方
@ManyToOne
转载于:https://my.oschina.net/maxdeath/blog/789278