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