mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
改进Query类的insert方法一处可能存在的警告错误 改进Model类一处Collection的use
This commit is contained in:
@@ -2065,8 +2065,10 @@ class Query
|
||||
$sequence = $sequence ?: (isset($options['sequence']) ? $options['sequence'] : null);
|
||||
$lastInsId = $this->getLastInsID($sequence);
|
||||
if ($lastInsId) {
|
||||
$pk = $this->getPk($options);
|
||||
$data[$pk] = $lastInsId;
|
||||
$pk = $this->getPk($options);
|
||||
if (is_string($pk)) {
|
||||
$data[$pk] = $lastInsId;
|
||||
}
|
||||
}
|
||||
$options['data'] = $data;
|
||||
$this->trigger('after_insert', $options);
|
||||
|
||||
Reference in New Issue
Block a user