|
I'm experiencing a different behavior with Hibernate ORM 4.3.11 with extra revisions being created for parent entities when a child (@OneToOne) is modified. With Hibernate 4.3.10 it's working as expected:
-
the parent and child objects are created (one INSERT each, one revision each)
-
the child object is updated (one UPDATE for the child, one revision)
With Hibernate 4.3.11, step 2 triggers an extra revision for the parent (but no update since it has not changed).
I simplified the model as much as I could in the attached test case.
@Entity(name = "PARENT")
@Data
@Audited
public static class ComplexParentEntity {
@Id
private Long id;
@OneToOne
private ChildEntity child;
@OneToMany
private List<ChildDiscrepancy> discrepancyList;
@Temporal(TemporalType.DATE)
private Date issueDate;
}
If I remove the (unused) discrepancyList, the test passes. If issueDate is left as null during the initial insert, the test passes. If the TemporalType is changed to TIMESTAMP (but not TIME), the test passes.
|