Something you may want to consider is that you are placing yourself
within the limitations of entity groups by sticking children under
parent keys. You may want to consider a model where the parent key is
simply a field in the child and then run a simple query testing that
the "parentKey" field is equal to the one you're looking for. This
makes queries easier and prevents entity group lock-in.

Cheers!

On Mar 18, 8:55 am, tempy <[email protected]> wrote:
> I want to retrieve all entities that are children of one other
> particular entity, by checking if the parent-key property of the
> child's key matches the parent key.  I have a reference to the parent
> entity but I want to avoid loading all of its children (as there may
> be many children, but I only need a few).  Thus I want a query that
> looks something like this:
>
>         query = pm.newQuery("select from " + ChildClass.class.getName() +
> " where :parentID.contains(ChildIDProperty.ParentID) &&
> SomeOtherProperty  > " + filterString);
>
> But I'm not sure how to exactly address the parent key property of a
> key in a query.
>
> Thanks,
> Mike

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to