Skip to:
Affects ORM 6.2, but not 5.6, and (I think) not 6.1 either.
With the following model, attempting to remove one entity from the associations may result in the whole association being cleared.
The problem appears to be in the SQL generated to remove an element from the association, which completely ignores one side of the association:
Whereas, when @JoinTable(inverseColumn) is not used, we get:
@JoinTable(inverseColumn)
Removing @JoinTable(inverseColumn = ...), or moving from SortedSet to List, makes the problem disappear.
@JoinTable(inverseColumn = ...)
SortedSet
List
I will submit a reproducer in the comments.
Here is a reproducer:
Affects ORM 6.2, but not 5.6, and (I think) not 6.1 either.
With the following model, attempting to remove one entity from the associations may result in the whole association being cleared.
The problem appears to be in the SQL generated to remove an element from the association, which completely ignores one side of the association:
Whereas, when
@JoinTable(inverseColumn)
is not used, we get:Removing
@JoinTable(inverseColumn = ...)
, or moving fromSortedSet
toList
, makes the problem disappear.I will submit a reproducer in the comments.