@@ 165-168 (lines=4) @@ | ||
162 | } elseif (isset($mapping['association']) && $mapping['type'] === 'many' && $new) { |
|
163 | if (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForUpdate($new)) { |
|
164 | $updateData['$set'][$mapping['name']] = $this->prepareAssociatedCollectionValue($new, true); |
|
165 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($new)) { |
|
166 | $updateData['$unset'][$mapping['name']] = true; |
|
167 | $this->uow->unscheduleCollectionDeletion($new); |
|
168 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($old)) { |
|
169 | $updateData['$unset'][$mapping['name']] = true; |
|
170 | $this->uow->unscheduleCollectionDeletion($old); |
|
171 | } elseif ($mapping['association'] === ClassMetadata::EMBED_MANY) { |
|
@@ 199-202 (lines=4) @@ | ||
196 | $mapping = $coll->getMapping(); |
|
197 | if (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForUpdate($coll)) { |
|
198 | $updateData['$set'][$mapping['name']] = $this->prepareAssociatedCollectionValue($coll, true); |
|
199 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($coll)) { |
|
200 | $updateData['$unset'][$mapping['name']] = true; |
|
201 | $this->uow->unscheduleCollectionDeletion($coll); |
|
202 | } |
|
203 | // @ReferenceMany is handled by CollectionPersister |
|
204 | } |
|
205 | return $updateData; |