5.0.0 - 普通 - 未处理
刚刚得到回复说"hasOne"对JOIN使用field是无效的,流哥,这个不能一国二制好不好.于是查看"OneToOne.php",第95~98行存在field过滤,但"$this->option"属性在父类"Relation"中不存在,那么补齐.
// 关联查询参数
protected $option;并且在"__call"函数中将 if ($result instanceof Query) {
return $this;
} else {
$this->baseQuery = false;
return $result;
}改为 if ($result instanceof Query) {
$this->option = $result->getOptions();
return $this;
} else {
$this->option = [];
$this->baseQuery = false;
return $result;
}我想问的是,为什么5.0.7以后去掉这个功能了?如果按上面这样操作对整体有什么影响呢? 