You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following query I would like to get the facilities along with the AVG review of each when done like this WITHOUT the pagianteRaw or pagiante function it return the results as expected.
The issue is when using the same query and passing it into the paginateRaw or paginate function. It returns the following error. It expects an extra query like so .addGroupBy("facreviews.reviewUuid")
query failed: SELECT COUNT(*) AS "value" FROM (SELECT * FROM "facilities" "facilities" LEFT JOIN "facility_price" "fcp" ON "fcp"."facilityPriceUuid"="facilities"."facilityUuid" LEFT JOIN "reviews" "facreviews" ON "facreviews"."facilityUuid"="facilities"."facilityUuid" GROUP BY "facilities"."facilityUuid", "fcp"."facilityPriceUuid") "uniqueTableAlias"
error: error: column "facreviews.reviewUuid" must appear in the GROUP BY clause or be used in an aggregate function
I cant group by review, since if I do it will return all the reviews posted, and instead of a single facility with its average review it ends up getting a dozen of entries. Again typeorm performs as intended despite it not being grouped by reviews.
The text was updated successfully, but these errors were encountered:
I have the following query I would like to get the facilities along with the AVG review of each when done like this WITHOUT the pagianteRaw or pagiante function it return the results as expected.
The body ends up looking like so,
The issue is when using the same query and passing it into the paginateRaw or paginate function. It returns the following error. It expects an extra query like so
.addGroupBy("facreviews.reviewUuid")
I cant group by review, since if I do it will return all the reviews posted, and instead of a single facility with its average review it ends up getting a dozen of entries. Again typeorm performs as intended despite it not being grouped by reviews.
The text was updated successfully, but these errors were encountered: