| @@ 298-305 (lines=8) @@ | ||
| 295 | $this->document->unsetField($field)->save(); |
|
| 296 | break; |
|
| 297 | ||
| 298 | case Document::RELATION_HAS_ONE; |
|
| 299 | $document = $this->getRelated($relationName); |
|
| 300 | if (!$document) { |
|
| 301 | // relation not exists |
|
| 302 | return $this; |
|
| 303 | } |
|
| 304 | $document->unsetField($field)->save(); |
|
| 305 | break; |
|
| 306 | ||
| 307 | case Document::RELATION_HAS_MANY: |
|
| 308 | if (!$document) { |
|
| @@ 246-253 (lines=8) @@ | ||
| 243 | $this->document->unsetField($field)->save(); |
|
| 244 | break; |
|
| 245 | ||
| 246 | case Document::RELATION_HAS_ONE; |
|
| 247 | $document = $this->getRelated($relationName); |
|
| 248 | if (!$document) { |
|
| 249 | // relation not exists |
|
| 250 | return $this; |
|
| 251 | } |
|
| 252 | $document->unsetField($field)->save(); |
|
| 253 | break; |
|
| 254 | ||
| 255 | case Document::RELATION_HAS_MANY: |
|
| 256 | if (!$document) { |
|