Hi Jeff,

You're correct that the only way to access a datastore entity is to provide
the full path to it - the key is the entity's primary (and only) key. If you
know the entity type of each entity in the heirarchy, though, you can
extract the id of the entity in question and all its parents, and represent
the ID as a delimiter-separated list of IDs, though - 1/2/3/4 - and
regenerate the key yourself.

-Nick Johnson

On Sun, Jun 14, 2009 at 5:51 PM, Jeff Enderwick <[email protected]>wrote:

>
> I have possibly deep entity groups (think tree structure), but I want
> a URL where the user can go to a specific node, like:
>
> http://viewnode/<node-id>.
>
> I'd like to use db.get() to directly access the node rather than query
> based on node-id.
>
> If I build the URL based on str(node.key()), then the strings can get
> very big. Key.from_path() seems to want the entire path from the
> parent. Is it really the case that the only way to get direct access
> to an interior node in an entity group is provide the entire path to
> that node?
>
> Thanks, Jeff
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to