PGSQL requires group by id for book search
This commit is contained in:
parent
97247373a9
commit
0b9e9d00fa
|
@ -48,6 +48,12 @@ class SearchController {
|
||||||
[fn('AVG', col('Ratings.rating')), 'averageRating'],
|
[fn('AVG', col('Ratings.rating')), 'averageRating'],
|
||||||
],
|
],
|
||||||
order: [[col('totalInteractions'), 'DESC']],
|
order: [[col('totalInteractions'), 'DESC']],
|
||||||
|
group: [
|
||||||
|
col('BookReference.id'),
|
||||||
|
col('Interactions.id'),
|
||||||
|
col('Reviews.id'),
|
||||||
|
col('Ratings.id'),
|
||||||
|
],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue