Swapping OneToOne relations results in am UNIQUE constraint failed
error
#3614
Labels
bug
Something isn't working
UNIQUE constraint failed
error
#3614
Describe the bug
When replacing an entity on a OneToOne relation the ORM first tries to insert the new entity. This results in an
UNIQUE constraint failed
error. You'd expect the ORM either to first set the foreign key toNULL
or to delete the old entity.Stack trace
To Reproduce
Steps to reproduce the behavior:
Expected behavior
You'd expect the ORM either to first set the foreign key to
NULL
or to delete the old entity.Additional context
Also tried mysql driver by the way.
Versions
The text was updated successfully, but these errors were encountered: