refs #6667 fix groupBy
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2024-01-17 14:39:11 +01:00
parent d1a3c67d2e
commit ccdef0458a
1 changed files with 7 additions and 3 deletions

View File

@ -49,10 +49,14 @@ module.exports = Self => {
LEFT JOIN business b ON b.workerFk = w.id LEFT JOIN business b ON b.workerFk = w.id
ORDER BY b.id DESC ORDER BY b.id DESC
LIMIT 10000000000000000000 LIMIT 10000000000000000000
) w ) w`);
GROUP BY w.id`);
stmt.merge(conn.makeSuffix(filter.fields));
stmt.merge(conn.makeWhere(filter.where));
stmt.merge(conn.makeGroupBy('w.id'));
stmt.merge(conn.makeOrderBy(filter.order));
stmt.merge(conn.makeLimit(filter.limit));
stmt.merge(conn.makeSuffix(filter));
return conn.executeStmt(stmt); return conn.executeStmt(stmt);
}; };