Skip to content

Commit 6bdae2a

Browse files
jloux-brapinickpalladino
authored andcommitted
Add DISTINCT to select id only query
1 parent 3e68ae5 commit 6bdae2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/brapi/test/BrAPITestServer/service/SearchQueryBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class SearchQueryBuilder<T> {
2121

2222
public SearchQueryBuilder(Class<T> clazz) {
2323
this.selectClause = "SELECT distinct entity FROM " + clazz.getSimpleName() + " entity ";
24-
this.selectOnlyIds = "SELECT entity.id FROM " + clazz.getSimpleName() + " entity ";
24+
this.selectOnlyIds = "SELECT distinct entity.id FROM " + clazz.getSimpleName() + " entity ";
2525
this.whereClause = "WHERE 1=1 ";
2626
this.defaultSort = " ORDER BY entity.id ASC ";
2727
this.sortClause = "";

0 commit comments

Comments
 (0)