diff --git a/library/think/Model.php b/library/think/Model.php index f8a06968..8e4498dd 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -381,6 +381,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess $value = $this->relation()->getRelation($name); // 保存关联对象值 $this->data[$name] = $value; + return $value; } else { throw new InvalidArgumentException('property not exists:' . __CLASS__ . '->' . $name); }