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
Subqueries are not affected, but the transformation which uses group by and count is wrong. This does not seem to be handeled properly and some databases don't support COUNT DISTINCT of a tuple. Therefore we will have to use the CHR or CHAR function to produce an expression like
col1 || CHR(1) || col2 || CHR(1) || ...
Since the character with the ASCII value of 1 will probably not be part of any string and the ASCII value 0 is not allowed, this should do the job.
We currently only do count distinct in the count query of a paginated criteria builder. If the id of an entity really is an embedded id, this won't work.
Subqueries are not affected, but the transformation which uses group by and count is wrong. This does not seem to be handeled properly and some databases don't support COUNT DISTINCT of a tuple. Therefore we will have to use the CHR or CHAR function to produce an expression like
col1 || CHR(1) || col2 || CHR(1) || ...
Since the character with the ASCII value of
1
will probably not be part of any string and the ASCII value0
is not allowed, this should do the job.JPA 2.1 compliant way would be
col1 || FUNCTION('CHR', 1) || col2 || FUNCTION'(CHR', 1) || ...
Databases that support row value constructors or tuples with a syntax like
(col1, col2, ...)
in count distincts could actually make use of it.The text was updated successfully, but these errors were encountered: