改进HasMany和OneToOne

This commit is contained in:
thinkphp
2017-01-17 10:53:14 +08:00
parent ebfcbac863
commit ed3becf64f
3 changed files with 21 additions and 8 deletions

View File

@@ -26,6 +26,18 @@ abstract class OneToOne extends Relation
// 要绑定的属性
protected $bindAttr = [];
/**
* 设置join类型
* @access public
* @param string $type JOIN类型
* @return $this
*/
public function joinType($type)
{
$this->joinType = $type;
return $this;
}
/**
* 预载入关联查询JOIN方式
* @access public