{
return $this->hasOne('TeacherModel','id','op_uid')->bind(['name'=>'teacher_name']);
}
$dataList = $this
->with($with)
->field('interest_id,op_utype,op_uid,create_time')
->where(['interest_id'=>$interest_id,'op_utype'=>$op_utype])
->select();
主表里面有3条,老师表里面有2条这样查询出来的数据结果还是3条有一条里面的teacher_name为空
最佳答案
