User::with()关联预载入查询出错(版本5.0.10)

浏览:1090 发布日期:2017/08/21 分类:求助交流 关键字: th5 关联预载入 bug
代码:dump(UserModel::with(['department'=>['name']])->select());浏览器返回提示:Missing argument 1 for think\db\Query::name()[2] ErrorException in Query.php line 157
Missing argument 1 for think\db\Query::name()
哪里有问题?求指教

测试了下:dump(UserModel::with(['department')->select());  //正常
dump(UserModel::with(['department, comment')->select()); //正常
dump(UserModel::with(['department.name')->select()); //出错Missing argument 1 for think\db\Query::name()
dump(UserModel::with(['department'=>['name']])->select());//出错Missing argument 1 for think\db\Query::name()
开发手册中留了一手吗?
最佳答案
评论() 相关
后面还有条评论,点击查看>>