mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修正setDec方法的延迟写入
This commit is contained in:
@@ -635,6 +635,7 @@ class Query
|
|||||||
$this->options = [];
|
$this->options = [];
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return $this->setField($field, ['inc', $field, $step]);
|
||||||
}
|
}
|
||||||
return $this->setField($field, ['dec', $field, $step]);
|
return $this->setField($field, ['dec', $field, $step]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class BelongsToMany extends Relation
|
|||||||
$this->query = (new $model)->db();
|
$this->query = (new $model)->db();
|
||||||
$this->pivot = $this->newPivot();
|
$this->pivot = $this->newPivot();
|
||||||
|
|
||||||
if (!is_subclass_of($this->pivot, '\\think\\model\\Pivot')) {
|
if ('think\model\Pivot' == get_class($this->pivot)) {
|
||||||
$this->pivot->name($this->middle);
|
$this->pivot->name($this->middle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user