mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进Model类delete方法
This commit is contained in:
@@ -1081,7 +1081,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
|
||||
// 删除条件
|
||||
$pk = $this->getPk();
|
||||
if (isset($this->data[$pk])) {
|
||||
if (is_string($pk) && isset($this->data[$pk])) {
|
||||
$where = [$pk => $this->data[$pk]];
|
||||
} elseif (!empty($this->updateWhere)) {
|
||||
$where = $this->updateWhere;
|
||||
|
||||
Reference in New Issue
Block a user