Using the $in operator through Morphia - doing it wrong?
问题 I have the following Play Framework entity (using Morphia for persistence) as part of a generic blogging app: @Entity public class Comment extends Model { ... @Reference @Indexed public SiteUser commenter; public static List<Comment> getLastCommentsByUsers(final List<SiteUser> users) { final Query<Comment> query ds().createQuery(Comment.class); query.field(commenter).hasAnyOf(users); return query.asList(); } } SiteUser: @Entity(noClassnameStored=true) public class SiteUser extends