|
The mapping is getting out of control if you just repeat the mandatory case at the @JoinColumn:
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "parent_id", nullable = false) public Set<BidirectionalMandatoryChild> getChildren()
In this case, Hibernate seems to lose the connection between the relations and tries to generate the parent_id column twice:
org.hibernate.MappingException: Repeated column in mapping for entity: test.bidirectionalmandatory.BidirectionalMandatoryChild column: parent_id (should be mapped with insert="false" update="false")
But this seems to be a different story?
|