Open LinusGeffarth opened 4 years ago
I'm trying to make a query with pagination, filtering and sorting. My query looks like this:
try Space.query(on: req).filter(\.isFeatured == true).sort(\.updatedAt, .descending) .paginate(for: req).flatMap { (paginated) in try paginated.data.relationals(req: req) }
It worked fine before adding the .sort(...) call. But after, I get this message:
.sort(...)
column "spaces.createdAt" must appear in the GROUP BY clause or be used in an aggregate function
What do I need to do? (btw I'm using PSQL)
perhaps related to #20
I'm trying to make a query with pagination, filtering and sorting. My query looks like this:
It worked fine before adding the
.sort(...)
call. But after, I get this message:What do I need to do? (btw I'm using PSQL)
perhaps related to #20