Skip to content

Commit

Permalink
Using whereColumn instead of groupBy
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Jun 11, 2019
1 parent 2cc3a29 commit 9ed02c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HasStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function (QueryBuilder $query) {
->select(DB::raw('max(id)'))
->from($this->getStatusTableName())
->where('model_type', $this->getStatusModelType())
->groupBy($this->getModelKeyColumnName());
->whereColumn($this->getModelKeyColumnName(), $this->getQualifiedKeyName());
}
);
}
Expand Down Expand Up @@ -100,7 +100,7 @@ function (QueryBuilder $query) use ($names) {
->select(DB::raw('max(id)'))
->from($this->getStatusTableName())
->where('model_type', $this->getStatusModelType())
->groupBy($this->getModelKeyColumnName());
->whereColumn($this->getModelKeyColumnName(), $this->getQualifiedKeyName());
}
);
}
Expand Down

0 comments on commit 9ed02c8

Please sign in to comment.