Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distinct using objectify

I am working google and engine and objectify, since for the last 3 hours i have been trying to write a distinct query in objectify. Can anyone tell me how to write a distinct query in objectify on a particular column?

Regards, Sreekanth

like image 421
Sreekanth Avatar asked Nov 30 '22 01:11

Sreekanth


1 Answers

Objectify (5.0.5+) now supports projection queries and distinct operation.

ofy().load().type(Entity.class).project("field1").distinct(true);

like image 193
Sathya Avatar answered Dec 16 '22 02:12

Sathya