mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
取消关联类无效的alias参数 仅morphTo关联保留 用于设置多态别名
This commit is contained in:
@@ -22,16 +22,14 @@ class HasOne extends OneToOne
|
||||
* @param string $model 模型名
|
||||
* @param string $foreignKey 关联外键
|
||||
* @param string $localKey 关联主键
|
||||
* @param array $alias 别名定义
|
||||
* @param string $joinType JOIN类型
|
||||
*/
|
||||
public function __construct(Model $parent, $model, $foreignKey, $localKey, $alias = [], $joinType = 'INNER')
|
||||
public function __construct(Model $parent, $model, $foreignKey, $localKey, $joinType = 'INNER')
|
||||
{
|
||||
$this->parent = $parent;
|
||||
$this->model = $model;
|
||||
$this->foreignKey = $foreignKey;
|
||||
$this->localKey = $localKey;
|
||||
$this->alias = $alias;
|
||||
$this->joinType = $joinType;
|
||||
$this->query = (new $model)->db();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user