diff --git a/src/repositories/trees.repository.ts b/src/repositories/trees.repository.ts index db47030d..0a27c403 100644 --- a/src/repositories/trees.repository.ts +++ b/src/repositories/trees.repository.ts @@ -136,7 +136,7 @@ export class TreesRepository extends DefaultCrudRepository< .buildColumnNames('Trees', filter) .replace('"id"', 'trees.id as "id"'); - const selectStmt = `SELECT DISTINCT ${columnNames} from trees ${this.getTreeTagJoinClause( + const selectStmt = `SELECT ${columnNames} from trees ${this.getTreeTagJoinClause( tagId, )}`; @@ -177,7 +177,7 @@ export class TreesRepository extends DefaultCrudRepository< } try { - const selectStmt = `SELECT COUNT(DISTINCT *) FROM trees ${this.getTreeTagJoinClause( + const selectStmt = `SELECT COUNT(*) FROM trees ${this.getTreeTagJoinClause( tagId, )}`;