| @@ 791-799 (lines=9) @@ | ||
| 788 | ||
| 789 | $updates = []; |
|
| 790 | foreach ($this->fields as $field => $value) { |
|
| 791 | if ($value instanceof RecordAccessorInterface) { |
|
| 792 | if ($value->hasUpdates()) { |
|
| 793 | $updates[$field] = $value->compileUpdates($field); |
|
| 794 | continue; |
|
| 795 | } |
|
| 796 | ||
| 797 | //Will be handled as normal update if needed |
|
| 798 | $value = $value->serializeData(); |
|
| 799 | } |
|
| 800 | ||
| 801 | if (array_key_exists($field, $this->updates)) { |
|
| 802 | $updates[$field] = $value; |
|
| @@ 908-915 (lines=8) @@ | ||
| 905 | { |
|
| 906 | $updates = []; |
|
| 907 | foreach ($this->fields as $field => $value) { |
|
| 908 | if ($value instanceof RecordAccessorInterface && $value->hasUpdates()) { |
|
| 909 | if ($value->hasUpdates()) { |
|
| 910 | $updates[$field] = $value->compileUpdates($field); |
|
| 911 | } else { |
|
| 912 | $updates[$field] = $value->serializeData(); |
|
| 913 | } |
|
| 914 | continue; |
|
| 915 | } |
|
| 916 | ||
| 917 | $updates[$field] = $value; |
|
| 918 | } |
|