From 8b962ae5c5d027e4040ea7af142e2ea8df9bd10f Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 16 Jan 2017 23:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E5=AF=B9=E4=B8=80=E5=85=B3=E8=81=94?= =?UTF-8?q?=E7=B1=BB=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/Relation.php | 6 ++---- library/think/model/relation/OneToOne.php | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/think/model/Relation.php b/library/think/model/Relation.php index 8797cca4..b16d08e4 100644 --- a/library/think/model/Relation.php +++ b/library/think/model/Relation.php @@ -21,14 +21,12 @@ abstract class Relation protected $parent; /** @var Model 当前关联的模型类 */ protected $model; + // 关联模型查询对象 + protected $query; // 关联表外键 protected $foreignKey; // 关联表主键 protected $localKey; - // 当前关联的JOIN类型 - protected $joinType; - // 关联模型查询对象 - protected $query; // 关联查询条件 protected $where; // 关联查询参数 diff --git a/library/think/model/relation/OneToOne.php b/library/think/model/relation/OneToOne.php index 549a389a..ea16b92b 100644 --- a/library/think/model/relation/OneToOne.php +++ b/library/think/model/relation/OneToOne.php @@ -21,6 +21,8 @@ abstract class OneToOne extends Relation { // 预载入方式 protected $eagerlyType = 0; + // 当前关联的JOIN类型 + protected $joinType; // 要绑定的属性 protected $bindAttr = [];