Skip to content

Commit

Permalink
add check force group by only when Model::useSoftDeletes is true on M…
Browse files Browse the repository at this point in the history
…odel::first()
samsonasik committed May 1, 2020

Verified

This commit was signed with the committer’s verified signature.
samsonasik Abdul Malik Ikhsan
1 parent b425aff commit 52b7a08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Model.php
Original file line number Diff line number Diff line change
@@ -472,7 +472,7 @@ public function first()
}
else
{
if (empty($builder->QBGroupBy) && ! empty($this->primaryKey))
if ($this->useSoftDeletes === true && empty($builder->QBGroupBy) && ! empty($this->primaryKey))
{
$builder->groupBy($this->table . '.' . $this->primaryKey);
}

0 comments on commit 52b7a08

Please sign in to comment.