think-orm
think-orm copied to clipboard
可能是个bug belongsToMany 多对多 只能查出最后一条数据
例如在group模型下定义好 关联 public function user(): \think\model\relation\BelongsToMany { return $this->belongsToMany(User::class, GroupAccess::class)->orderRaw('CONVERT(name USING gbk)'); }
self::with('user')->select(). 关联数据只有最后一条被查询到