@@ 189-192 (lines=4) @@ | ||
186 | } elseif (isset($mapping['association']) && $mapping['type'] === 'many' && $new) { |
|
187 | if (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForUpdate($new)) { |
|
188 | $updateData['$set'][$mapping['name']] = $this->prepareAssociatedCollectionValue($new, true); |
|
189 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($new)) { |
|
190 | $updateData['$unset'][$mapping['name']] = true; |
|
191 | $this->uow->unscheduleCollectionDeletion($new); |
|
192 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($old)) { |
|
193 | $updateData['$unset'][$mapping['name']] = true; |
|
194 | $this->uow->unscheduleCollectionDeletion($old); |
|
195 | } elseif ($mapping['association'] === ClassMetadata::EMBED_MANY) { |
|
@@ 223-226 (lines=4) @@ | ||
220 | $mapping = $coll->getMapping(); |
|
221 | if (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForUpdate($coll)) { |
|
222 | $updateData['$set'][$mapping['name']] = $this->prepareAssociatedCollectionValue($coll, true); |
|
223 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($coll)) { |
|
224 | $updateData['$unset'][$mapping['name']] = true; |
|
225 | $this->uow->unscheduleCollectionDeletion($coll); |
|
226 | } |
|
227 | // @ReferenceMany is handled by CollectionPersister |
|
228 | } |
|
229 | return $updateData; |