Fixed
Details
Assignee
Andrea BorieroAndrea BorieroReporter
Andrea BorieroAndrea BorieroComponents
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Andrea Boriero
Andrea BorieroReporter
Andrea Boriero
Andrea BorieroComponents
Fix versions
Affects versions
Priority
Created March 28, 2017 at 9:00 AM
Updated September 3, 2019 at 3:16 PM
Resolved April 11, 2017 at 9:51 AM
Entity A that contains:
@NotFound(action = NotFoundAction.IGNORE) @OneToOne(mappedBy = "a") private B b;
Entity B that contains:
@OneToOne @JoinTable(name = JOIN_TABLE, joinColumns = @JoinColumn(name = COLUMN_CASE_PRIMARY_KEY), inverseJoinColumns = @JoinColumn(name = COLUMN_CASE_PRIMARY_KEY_SIDE)) private A a;
Trying persist an object B with a = null causes the following exception
org.hibernate.PropertyValueException: not-null property references a null or transient value : at org.hibernate.engine.internal.Nullability.checkNullability(Nullability.java:92) at org.hibernate.action.internal.AbstractEntityInsertAction.nullifyTransientReferencesIfNotAlready(AbstractEntityInsertAction.java:115) at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:69) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:623)