| @@ 758-766 (lines=9) @@ | ||
| 755 | ||
| 756 | $updates = []; |
|
| 757 | foreach ($this->fields as $field => $value) { |
|
| 758 | if ($value instanceof RecordAccessorInterface) { |
|
| 759 | if ($value->hasUpdates()) { |
|
| 760 | $updates[$field] = $value->compileUpdates($field); |
|
| 761 | continue; |
|
| 762 | } |
|
| 763 | ||
| 764 | //Will be handled as normal update if needed |
|
| 765 | $value = $value->serializeData(); |
|
| 766 | } |
|
| 767 | ||
| 768 | if (array_key_exists($field, $this->updates)) { |
|
| 769 | $updates[$field] = $value; |
|
| @@ 875-882 (lines=8) @@ | ||
| 872 | { |
|
| 873 | $updates = []; |
|
| 874 | foreach ($this->fields as $field => $value) { |
|
| 875 | if ($value instanceof RecordAccessorInterface && $value->hasUpdates()) { |
|
| 876 | if ($value->hasUpdates()) { |
|
| 877 | $updates[$field] = $value->compileUpdates($field); |
|
| 878 | } else { |
|
| 879 | $updates[$field] = $value->serializeData(); |
|
| 880 | } |
|
| 881 | continue; |
|
| 882 | } |
|
| 883 | ||
| 884 | $updates[$field] = $value; |
|
| 885 | } |
|