mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
Model类的hasWhere方法支持hasone
This commit is contained in:
@@ -1105,6 +1105,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
$model = new static();
|
||||
$info = $model->$relation()->getRelationInfo();
|
||||
switch ($info['type']) {
|
||||
case Relation::HAS_ONE:
|
||||
case Relation::HAS_MANY:
|
||||
$table = $info['model']::getTable();
|
||||
if (is_array($where)) {
|
||||
|
||||
Reference in New Issue
Block a user