Skip to content

$modify queries broken in v5.5.1 #102

Closed
@alex-all3dp

Description

@alex-all3dp

Updating to 5.5.1 with objection 2.2.0 and pg 8.2.1 results in the following error message for GET requests with $modify query:

"select count(distinct("tableName"."columnName", "tableName"."columnName")) as "total", "tableName"."columnName" from "tableName" - column "tableName.columnName" must appear in the GROUP BY clause or be used in an aggregate function"

the modifier looks something like this:

static get modifiers() {
    return {
      includeRef: (builder: QueryBuilder<TableName>) =>
        builder
          .withGraphFetched('reference')
          .modifyGraph('reference', (refBuilder: QueryBuilder<RefTable>) =>
            refBuilder.select('columnName')
          ),
    }
  }

Does the modifier need to be adapted in any way? It would be odd in my eyes, given that the update is declared as a patch release and should not break existing implementations like this?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions