Skip to content

Commit

Permalink
add model table prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
pxpm committed Sep 19, 2023
1 parent 58160d0 commit 954edb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/Library/CrudPanel/Traits/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private function getCountFromQuery(Builder $query)
$subQuery = $crudQuery->cloneWithout(['columns', 'orders', 'limit', 'offset']);

// select minimum possible columns for the count
$minimumColumns = ($crudQuery->groups || $crudQuery->havings) ? '*' : $modelTable.'.'.$this->model->getKeyName();
$minimumColumns = ($crudQuery->groups || $crudQuery->havings) ? $modelTable.'.*' : $modelTable.'.'.$this->model->getKeyName();
$subQuery->select($minimumColumns);

// in case there are raw expressions we need to add them too.
Expand Down

0 comments on commit 954edb2

Please sign in to comment.