> How do I build a key from parent and child if I don't know the parent's
> key?
I use a field to link the entity group parent instance to a child
instance. I make this bi-directional, so from an entity I can retrieve
both its parent and also its child or set of children.


> Thanks a lot for your helpful code Ian! Now I've implemented the long
> as gae.pk-id.
Just be aware that in my code snippet "Way 1" I have both an encoded
key string (key="gae.encoded-pk") as the primary key as well as a Long
value as a Long ID (gae.pk-id). I believe that GAE/J extracts this
Long ID as a summary of the entity's full primary key (which contains
its full entity group "path" from its entity group root all the way
through to itself). The GAE/J persistence documentation shows how to
use the Long ID (gae.pk-id) (and I trust that my code conforms!).

Enjoy!

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to