Skip to content

Commit df84458

Browse files
committed
fix: getRelationQuery error due to breaking change
1 parent a9b432b commit df84458

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

src/Relations/HasMany.php

-16
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,6 @@ public function getRelationCountQuery(Builder $query, Builder $parent)
5858
return $query->select($foreignKey)->where($foreignKey, 'exists', true);
5959
}
6060

61-
/**
62-
* Add the constraints for a relationship query.
63-
* @param Builder $query
64-
* @param Builder $parent
65-
* @param array|mixed $columns
66-
* @return Builder
67-
*/
68-
public function getRelationQuery(Builder $query, Builder $parent, $columns = ['*'])
69-
{
70-
$query->select($columns);
71-
72-
$key = $this->wrap($this->getQualifiedParentKeyName());
73-
74-
return $query->where($this->getHasCompareKey(), 'exists', true);
75-
}
76-
7761
/**
7862
* Get the name of the "where in" method for eager loading.
7963
* @param \Illuminate\Database\Eloquent\Model $model

src/Relations/HasOne.php

-16
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,6 @@ public function getRelationCountQuery(Builder $query, Builder $parent)
5858
return $query->select($foreignKey)->where($foreignKey, 'exists', true);
5959
}
6060

61-
/**
62-
* Add the constraints for a relationship query.
63-
* @param Builder $query
64-
* @param Builder $parent
65-
* @param array|mixed $columns
66-
* @return Builder
67-
*/
68-
public function getRelationQuery(Builder $query, Builder $parent, $columns = ['*'])
69-
{
70-
$query->select($columns);
71-
72-
$key = $this->wrap($this->getQualifiedParentKeyName());
73-
74-
return $query->where($this->getForeignKeyName(), 'exists', true);
75-
}
76-
7761
/**
7862
* Get the name of the "where in" method for eager loading.
7963
* @param \Illuminate\Database\Eloquent\Model $model

0 commit comments

Comments
 (0)