开发者

CheckNullability of PrimaryKeyJoinColumn

开发者 https://www.devze.com 2023-01-27 08:26 出处:网络
I have a Entity class that has the ObjectX attribute: @OneToOne(fetch = FetchType.LAZY) @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

精彩评论

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

关注公众号