Update to Hibernate 5.2.10
See original GitHub issueHello, I just switched to DW 1.1.0 (from 1.0.6) and immediately found a problem with the new Hibernate (5.2.8). It is described pretty good here: https://hibernate.atlassian.net/browse/HHH-11496
It seems, I am experiencing the same thing. I have two entities: Club and Tenant Club:
@Entity
public class Club {
@Id
@GeneratedValue
private Integer id;
@Column(nullable = false)
private String name;
@OneToOne
@JoinColumn(name = "tenant_id")
private Tenant tenant;
...
}
and Tenant:
@Entity
public class Tenant {
@Id
@GeneratedValue
private Integer id;
@OneToOne(mappedBy = "tenant", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
private Club club;
...
}
Well, basically, constructing these entities I followed the official Hibernate User Guide.
Everything worked fine in DW 1.0.6 (and HIbernate 5.1.0 respectively) but after switching I noticed exceptions reporting about ConstraintViolations. I checked the logs, debugged and saw that Hibernate tries to insert a Club
first, however, it should insert it only after Tenant
.
Writing a test for this would be pretty time consuming task. If you really need this - I might try.
Have you experiences anything like this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Done
Should be resolved as part of #2021.