5.0.0 - 严重 - 未处理
$order = OrderModel::get(1);
$order->append('user'=>['nickname','email']);但是如果这个用户被删除(软删除) 获取到的数据是一个 null 就会有一个异常
Call to a member function visible() on null目前自己修改了框架: // 追加关联对象属性
$relation = $this->getRelation($key);
if (!$relation) {
$relation = $this->getAttr($key);
if ($relation !== null){
$relation->visible($name);
}
}
if ($relation === null) {
$item[$key] = null;
}else{
$item[$key] = $relation->append($name)->toArray();
}这样就可以运行了 