取消关联类无效的alias参数 仅morphTo关联保留 用于设置多态别名

This commit is contained in:
thinkphp
2017-01-16 23:03:12 +08:00
parent 908de8f4ee
commit 1568af03d8
9 changed files with 31 additions and 44 deletions

View File

@@ -33,9 +33,8 @@ class HasManyThrough extends Relation
* @param string $firstkey 关联外键
* @param string $secondKey 关联外键
* @param string $localKey 关联主键
* @param array $alias 别名定义
*/
public function __construct(Model $parent, $model, $through, $foreignKey, $throughKey, $localKey, $alias = [])
public function __construct(Model $parent, $model, $through, $foreignKey, $throughKey, $localKey)
{
$this->parent = $parent;
$this->model = $model;
@@ -43,7 +42,6 @@ class HasManyThrough extends Relation
$this->foreignKey = $foreignKey;
$this->throughKey = $throughKey;
$this->localKey = $localKey;
$this->alias = $alias;
$this->query = (new $model)->db();
}