modify plugin name
This commit is contained in:
+6
-12
@@ -574,7 +574,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
}
|
}
|
||||||
|
|
||||||
$primary = $this->getPrimary();
|
$primary = $this->getPrimary();
|
||||||
if (!isset($param[$primary]) || empty($param[$primary])) {
|
if (empty($param[$primary])) {
|
||||||
$this->setAttribute($primary, (int)$lastId);
|
$this->setAttribute($primary, (int)$lastId);
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
@@ -710,17 +710,11 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
*/
|
*/
|
||||||
private function separation(): array
|
private function separation(): array
|
||||||
{
|
{
|
||||||
$_tmp = [];
|
$assoc = array_diff_assoc($this->_oldAttributes, $this->_attributes);
|
||||||
$condition = [];
|
|
||||||
foreach ($this->_attributes as $key => $val) {
|
$uassoc = array_intersect_assoc($this->_attributes, $this->_oldAttributes);
|
||||||
$oldValue = $this->_oldAttributes[$key] ?? NULL;
|
|
||||||
if ($val === $oldValue) {
|
return [$assoc, $uassoc, array_keys($assoc)];
|
||||||
$condition[$key] = $val;
|
|
||||||
} else {
|
|
||||||
$_tmp[$key] = $val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [$_tmp, $condition, array_keys($_tmp)];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user