hasMany的has方法默认不指定字段

This commit is contained in:
thinkphp
2017-09-07 11:24:14 +08:00
parent 49b349be90
commit 50e834c5b5

View File

@@ -244,7 +244,6 @@ class HasMany extends Relation
return $this->parent->db()
->alias($model)
->field($model . '.*')
->join($table . ' ' . $relation, $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $joinType)
->group($relation . '.' . $this->foreignKey)
->having('count(' . $id . ')' . $operator . $count);