| @@ 177-184 (lines=8) @@ | ||
| 174 | $updateData['$unset'][$mapping['name']] = true; |
|
| 175 | ||
| 176 | // Update existing embedded document |
|
| 177 | } else { |
|
| 178 | $update = $this->prepareUpdateData($new); |
|
| 179 | foreach ($update as $cmd => $values) { |
|
| 180 | foreach ($values as $key => $value) { |
|
| 181 | $updateData[$cmd][$mapping['name'] . '.' . $key] = $value; |
|
| 182 | } |
|
| 183 | } |
|
| 184 | } |
|
| 185 | ||
| 186 | // @ReferenceMany, @EmbedMany |
|
| 187 | } elseif (isset($mapping['association']) && $mapping['type'] === 'many' && $new) { |
|
| @@ 274-281 (lines=8) @@ | ||
| 271 | } elseif ( ! $new) { |
|
| 272 | ||
| 273 | // Update existing embedded document |
|
| 274 | } else { |
|
| 275 | $update = $this->prepareUpsertData($new); |
|
| 276 | foreach ($update as $cmd => $values) { |
|
| 277 | foreach ($values as $key => $value) { |
|
| 278 | $updateData[$cmd][$mapping['name'] . '.' . $key] = $value; |
|
| 279 | } |
|
| 280 | } |
|
| 281 | } |
|
| 282 | ||
| 283 | // @ReferenceOne |
|
| 284 | } elseif (isset($mapping['association']) && $mapping['association'] === ClassMetadata::REFERENCE_ONE) { |
|