您的位置:首页 > 其它

jpa @ManyToOne Could not determine type for **错误

2018-01-28 12:46 316 查看


jpa ManyToOne 绑定问题

这种错误一般是,这个字段的@Annotation和其他字段的不一致造成的。如果你的@ManyToOne写在get方法上,这个类每个@column之类的Annotation都写在get方法上,如果都在字段上,就都写在字段上。

@ManyToOne(fetch = FetchType.EAGER, targetEntity = SoInfo.class)

@JoinColumn(name="order_no", referencedColumnName = "order_no", insertable = false, updatable = false)


public SoInfo getOrder() {
return order;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  jpa ManyToOne