📦 更新thinkphp(v5.1.37.1)
This commit is contained in:
@@ -58,6 +58,16 @@ abstract class Relation
|
||||
return $this->query->getModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前的关联模型类的实例
|
||||
* @access public
|
||||
* @return Query
|
||||
*/
|
||||
public function getQuery()
|
||||
{
|
||||
return $this->query;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前关联为自关联
|
||||
* @access public
|
||||
@@ -129,6 +139,17 @@ abstract class Relation
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @access public
|
||||
* @param array $data 更新数据
|
||||
* @return integer|string
|
||||
*/
|
||||
public function update(array $data = [])
|
||||
{
|
||||
return $this->query->update($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
* @access public
|
||||
|
||||
Reference in New Issue
Block a user