I've got a snippet of code that looks something like this....

public  getSubEntities(Transaction transaction, Key parent) {
        com.google.appengine.api.datastore.Query query;
        com.google.appengine.api.datastore.PreparedQuery pquery;

        Map<Key, Entity>  out = new HashMap<Key, Entity>();

        query = new
com.google.appengine.api.datastore.Query().setAncestor(parent);
        pquery = datastore.prepare(transaction, query);

        for (Entity e : pquery.asQueryResultIterable()) {
            out.put(e.getKey(), e);
        }

        return out;
}

...but when I run it, it never finds any sub entities of the given key.  I'm
guessing I'm missing somthing?  I'm trying to find all the direct
sub-entities of the given entity key.  I've checked that they're in the
datastore, but for whatever reason the loop never hits.  Any suggestions?  I
haven't tried this in the app engine, just the local data store.


-- 
Patrick H. Twohig.

Namazu Studios
P.O. Box 34161
San Diego, CA 92163-4161

Office: 619.862.2890 x100
Cell: 619.453.5075
Twitter: @svm_invictvs
IRC: svm_invic...@irc.freenode.net ##java, #android-dev, #iphonedev,
#appengine

http://www.namazustudios.com/

This communication, and any attachments, shall be considered confidential
and proprietary information of Namazu Studios LLC.  This message, and
attachments, are intended for the listed recipients only.  If you are not
one of the intended recipients, please destroy all copies of this
communication.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to