@@ 184-187 (lines=4) @@ | ||
181 | } elseif (isset($mapping['association']) && $mapping['type'] === 'many' && $new) { |
|
182 | if (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForUpdate($new)) { |
|
183 | $updateData['$set'][$mapping['name']] = $this->prepareAssociatedCollectionValue($new, true); |
|
184 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($new)) { |
|
185 | $updateData['$unset'][$mapping['name']] = true; |
|
186 | $this->uow->unscheduleCollectionDeletion($new); |
|
187 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($old)) { |
|
188 | $updateData['$unset'][$mapping['name']] = true; |
|
189 | $this->uow->unscheduleCollectionDeletion($old); |
|
190 | } elseif ($mapping['association'] === ClassMetadata::EMBED_MANY) { |
|
@@ 218-221 (lines=4) @@ | ||
215 | $mapping = $coll->getMapping(); |
|
216 | if (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForUpdate($coll)) { |
|
217 | $updateData['$set'][$mapping['name']] = $this->prepareAssociatedCollectionValue($coll, true); |
|
218 | } elseif (CollectionHelper::isAtomic($mapping['strategy']) && $this->uow->isCollectionScheduledForDeletion($coll)) { |
|
219 | $updateData['$unset'][$mapping['name']] = true; |
|
220 | $this->uow->unscheduleCollectionDeletion($coll); |
|
221 | } |
|
222 | // @ReferenceMany is handled by CollectionPersister |
|
223 | } |
|
224 | return $updateData; |