Play! Morphia querying within Collection (i.e. Set or List) fields
I have documents with a Set of Long values for their parent documents like so:

    {..., "parentIDs" : [ 47, 49 ], ...}

In my Entity class this field is defined as:

    @Embedded(concreteClass = java.util.TreeSet.class)
    @Indexed
    public Set<Long> parentIDs = new TreeSet<Long>();

What would be the Morphia query to return all documents with a specific parent ID (for example 47)?

I'm using:

    List<Node> nl = Node.find("type", "event").filter("parentIDs", id).asList();

with id being a correct and existing parent document id.
But it does not work. What am I missing?

thanks eriq
Play! Morphia querying within Collection (i.e. Set or List) fields
===

I have documents with a Set of Long values for their parent documents like so:

    {..., "parentIDs" : [ 47, 49 ], ...}

In my Entity class this field is defined as:

    @Embedded(concreteClass = java.util.TreeSet.class)
    @Indexed
    public Set<Long> parentIDs = new TreeSet<Long>();

What would be the Morphia query to return all documents with a specific parent ID (for example 47)?

I'm using:

    List<Node> nl = Node.find("type", "event").filter("parentIDs", id).asList();

with id being a correct and existing parent document id.
But it does not work. What am I missing?

thanks eriq