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 = [];