« Previous | Next » 

Revision ca60d48e

IDca60d48ec5f7fc4e39c5a833c429ea83411e1fa5

Added by Christian Müller about 9 years ago

[!!!][BUGFIX] Don't override orphanRemoval setting from Doctrine

In Doctrine 2 ORM, orphanRemoval is disabled by default. In FLOW3 we want
orphanRemoval to happen, if the target is not an aggregate root, changing
the default Doctrine behavior.

Because we want developers to be able to override that override, we had a
check in place, to favor the setting coming from the annotation. But since
there is no way to check if the FALSE in the orphanRemoval of an annotation
is the default or has been explitly set, this would fail to allow an
override with FALSE.

For many-to-many we thus assume that orphanRemoval is very rarely a
useful thing, and thus skip our own default handling.

If you want orphanRemoval on many-to-many associations, you now must
explicitly enable it with the annotation option!

Change-Id: I85c2998f0ce7700d10a8f57b0597eb9d3be4d095
Fixes: #40389
Releases: 1.2

  • added
  • modified
  • copied
  • renamed
  • deleted