Using collection.set
fails with composite foreign keys and orphan removal
#3666
Labels
bug
Something isn't working
Describe the bug
Using the
set
function on aOneToMany
attribute results in aValidationError
when the child has a composite key consisting entirely of foreign keys.Stack trace
To Reproduce
The following code is mostly copied from GH519.test.ts. I changed the User class to have just an id to simplify things.
It fails to execute
competition.registrations.set([registration2])
.Expected behavior
Since
competition.registrations.set([registration2, registration3])
runs, I expectcompetition.registrations.set([registration2])
to also run without error.Versions
The text was updated successfully, but these errors were encountered: