|
@@ 792-800 (lines=9) @@
|
| 789 |
|
|
| 790 |
|
// build the insert array |
| 791 |
|
$insertValues = []; |
| 792 |
|
foreach ($this->_unsaved as $k => $value) { |
| 793 |
|
// remove any non-existent or immutable properties |
| 794 |
|
$property = static::getProperty($k); |
| 795 |
|
if ($property === null || $property['mutable'] == self::IMMUTABLE) { |
| 796 |
|
continue; |
| 797 |
|
} |
| 798 |
|
|
| 799 |
|
$insertValues[$k] = $value; |
| 800 |
|
} |
| 801 |
|
|
| 802 |
|
if (!self::getDriver()->createModel($this, $insertValues)) { |
| 803 |
|
return false; |
|
@@ 878-886 (lines=9) @@
|
| 875 |
|
|
| 876 |
|
// build the update array |
| 877 |
|
$updateValues = []; |
| 878 |
|
foreach ($this->_unsaved as $k => $value) { |
| 879 |
|
// remove any non-existent or immutable properties |
| 880 |
|
$property = static::getProperty($k); |
| 881 |
|
if ($property === null || $property['mutable'] != self::MUTABLE) { |
| 882 |
|
continue; |
| 883 |
|
} |
| 884 |
|
|
| 885 |
|
$updateValues[$k] = $value; |
| 886 |
|
} |
| 887 |
|
|
| 888 |
|
if (!self::getDriver()->updateModel($this, $updateValues)) { |
| 889 |
|
return false; |