Then we found in the JavaDoc of Query a method setDistinct(boolean). So we tried Ebean.find(Person.class).setDistinct(true) .select("name, city") .findList();
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 for distinct.
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?
Fixed in HEAD.