#1169 DDC-3343 - correcting one-to-many persister - association should not be updated directly if no orphan removal is involved
This commit is contained in:
parent
539c364ca6
commit
9eaac13615
@ -157,11 +157,17 @@ class OneToManyPersister extends AbstractCollectionPersister
|
||||
*/
|
||||
public function removeElement(PersistentCollection $collection, $element)
|
||||
{
|
||||
$mapping = $collection->getMapping();
|
||||
|
||||
if ( ! $mapping['orphanRemoval']) {
|
||||
// no-op: this is not the owning side, therefore no operations should be applied
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $this->isValidEntityState($element)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$mapping = $collection->getMapping();
|
||||
$persister = $this->uow->getEntityPersister($mapping['targetEntity']);
|
||||
|
||||
$targetMetadata = $this->em->getClassMetadata($mapping['targetEntity']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user