impactrudia / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
0 stars 0 forks source link

Distinct not unique #220

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sorry if this is a non-issue. I'm trying to get a distinct select to work - I'm 
getting entities returned, however they are not distinct.

My distinct column is named 'feed' which is @Index'ed and appears to be indexed 
correctly in the datastore viewer on Dev server (eg it is listed in 'Show 
indexes' and doesn't have '(unindexed)' beside the column). I haven't tried it 
on the production server. Feed is a String, it is one of two indexed columns.

List<FeedItemLink> linkItems = 
ofy().load().type(FeedItemLink.class).project("feed").distinct(true).filter("fee
dType", 1).limit(100).order("-date").list();

What is the expected output? What do you see instead?
Should return only the first entity for entities with the same 'feed' value. 
Returns multiple entities that share the same 'feed' value.

What version of the product are you using? On what operating system?
5.0.4

Thanks in advance for your help.

Original issue reported on code.google.com by dam...@aeromac.com on 26 Sep 2014 at 9:29

GoogleCodeExporter commented 9 years ago
This is a bug. It's fixed in master. It's serious enough that I will release 
5.0.5 now; it should be in maven central by the time you read this.

Thanks for finding it.

Original comment by lhori...@gmail.com on 30 Sep 2014 at 5:50

GoogleCodeExporter commented 9 years ago
Thanks for fixing it (and so quickly!) :)

Original comment by dam...@aeromac.com on 2 Oct 2014 at 11:54