mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进
This commit is contained in:
@@ -1124,10 +1124,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
|
|
||||||
// 获取自动增长主键
|
// 获取自动增长主键
|
||||||
if ($result && $insertId = $this->getQuery()->getLastInsID($sequence)) {
|
if ($result && $insertId = $this->getQuery()->getLastInsID($sequence)) {
|
||||||
$pks = (array) $pk;
|
foreach ((array) $pk as $key) {
|
||||||
foreach ($pks as $pk) {
|
if (!isset($this->data[$key]) || '' == $this->data[$key]) {
|
||||||
if (!isset($this->data[$pk]) || '' == $this->data[$pk]) {
|
$this->data[$key] = $insertId;
|
||||||
$this->data[$pk] = $insertId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user