think-orm
think-orm copied to clipboard
远程一对一多关联,表名称不全导致查询sql出错
https://github.com/top-think/think-orm/blob/e1974a4c3b1b4c5b808fcc0863fc254e711dee13/src/model/relation/HasManyThrough.php#L264
if ($this->baseQuery) { $throughKey = Str::snake(class_basename($this->model)) . "." . $this->throughKey; }
Str::snake(class_basename($this->model)) 只能得到没有前缀的表名,如果有前缀那不是错了;现在使用远程一对多关联直接报错;没更新之前还是好的,这么改是为什么呢
