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
Distinct only works with projection queries, which are not directly supported by Objectify yet. They are on the roadmap. Please star this issue: https://code.google.com/p/objectify-appengine/issues/detail?id=188
In the mean time, you can issue a low-level API query and use objectify's load().fromEntity() to convert the result set to POJOs.
It's important to not that DISTINCT works only with projection queries and I don't believe Objectify currently supports them (it currently returns only whole entities). You can still use the low-level Datastore API to perform a projection query.