So I have a class defined like this:
And class Medium has no reference to the class Settings.
Now suppose I have a $Settings object that is already persisted and has been correctly loaded. Also suppose that the $Settings object has a $medium (that is, $Settings->medium = $OldMedium)
Now suppose I do:
Where $NewMedium is a different Medium object.
When I persist $Settings, Doctrine does delete $OldMedium from the DB, but the problem is that it also deletes $NewMedium ...
I have tried removing onDelete="SET NULL", but then I receive a "cannot delete, constraint failed" error...