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