Model类属性tableName改为table Connection类getTableName 更改为 getTable

This commit is contained in:
thinkphp
2016-04-20 22:07:31 +08:00
parent a5505c000c
commit a8490a7735
5 changed files with 166 additions and 167 deletions

View File

@@ -429,7 +429,7 @@ class Relation
protected function belongsToManyQuery($model, $table, $localKey, $foreignKey, $condition = [])
{
// 关联查询封装
$tableName = $model::getTableName();
$tableName = $model::getTable();
$relationFk = (new $model)->getPk();
return $model::field($tableName . '.*')
->field(true, false, $table, 'pivot', 'pivot__')