You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to do a distinct count with specification. The code in the SimpleJpaRepository for the getCountQuery method has a the following if:
if (query.isDistinct()) {
query.select(builder.countDistinct(root));
} else {
query.select(builder.count(root));
}
But before that if the distinct of the query is never set, so I assume it is always false. I also can not set the distinct in the specification for this query. Like this the if does not make any sense or do I miss something?
Thanks
Best
Martin
The text was updated successfully, but these errors were encountered:
@maddin79 Can you recheck things give we just merged #1380 (8ea70c1) to main. This should parse the Distinct keyword found in custom count methods, and thus ONLY apply the distinct inside the select count(...) function (not outside).
See if this resolves this resolves the issue for you.
I need to do a distinct count with specification. The code in the SimpleJpaRepository for the getCountQuery method has a the following if:
But before that if the distinct of the query is never set, so I assume it is always false. I also can not set the distinct in the specification for this query. Like this the if does not make any sense or do I miss something?
Thanks
Best
Martin
The text was updated successfully, but these errors were encountered: