Executing DISTINCT query with objectify for app engine
问题 Given the following two tables, how do I write/execute the following query in objectify: SELECT DISTINCT(authorId) FROM Book ORDER BY date DESCENDING LIMIT 30. @Entity Book{ @Id private Long bookId;//auto generated private Key<Author> authorKey; private String title; private Date date; … } @Entity Author{ @Id private Long authorId;//auto generated private String name; … } Note that all I am looking for in my result is a list of authorIds, as in public List<Long> getActiveAuthors(){ ..