Bug 375 : RawSql parsing of distinct keyword
Priority 
Medium
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.7.7
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
11/10/2011
Updated 
11/10/2011
Type 
Bug
 
Attachments 
No attachments

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?

 
Rob 21 Mar 08:30
Fixed in HEAD

Fixed in HEAD.

woResponse

Upload a file