Then we found in the JavaDoc of Query a method setDistinct(boolean).
So we tried
But the result wasn't distinct.
Then we try RawSql, but if we used distinct in the sql, distinct was
assumed as a column. We tracked it down to
DRawSqlParser.parseSqlFindKeywords and in deed there was no handling
We ended at SqlQuery which works and was OK for now.
However we don't understand the idea from setDistinct and assume that
the behavior of RawSql is a bug?