开发者

CheckNullability of PrimaryKeyJoinColumn

I have a Entity class that has the ObjectX attribute:

@OneToOne(fetch = FetchType.LAZY)
@PrimaryKeyJoinColumn
public ClassOfObjectX getObjectX() {
return this.ObjectX;
}

This ObjectX can´t be null?

In Hibernate 3.4 I could save this object in the repository without any problem but now in Hibernate 3.6 it´s throwing this exception:

org.hibernate.Proper开发者_如何学PythontyValueException: not-null property references a null or transient value:


Can you check if it works when you set the property hibernate.check_nullability to false?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜