-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
Expected Behavior
In the AssignedUuidManyToManyPersistSpec.groovy#L62 test, it seems like the update is not overwritting the courses, instead it adds courses again:
c1.name = 'Mathematics'
s3.courses = [c1]
studentRepository.update(s3) // This does not remove old courses, but instead adds new ones.
def found2 = studentRepository.findById(s3.id).orElse(null)Despite calling update with the same course, the course gets added again and is duplicated.
We have added primary key to the join table columns and this test started failing because it wanted to add the same row twice breaking the primary key constraint.
Actual Behaviour
The test is breaking
Steps To Reproduce
Showed in this PR: #3632, as it adds primary key to mapping tables.
Environment Information
No response
Example Application
No response
Version
5.0.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels