Entity groups are named by the key of the root, which can be
constructed from a kind and a key name.

>From  http://code.google.com/appengine/docs/datastore/keysandentitygroups.html

"You can create an entity with an ancestor path without first creating
the parent entity. To do so, you create a Key for the ancestor using a
kind and key name, then use it as the parent of the new entity. All
entities with the same root ancestor belong to the same entity group,
whether or not the root of the path represents an actual entity."

Suppose that I want to atomically create an entity group with two
nodes, one the parent of the other.

class A(db.Model):
    pass

class B(db.Model):
    pass

a = A(key_name='unique')
b = B(parent=a.key())

db.put([a,b])

Note that there's a bug in the SDK (and maybe GAE as well) in this
area

http://code.google.com/p/googleappengine/issues/detail?id=883


On Nov 21, 5:32 pm, "David Symonds" <[EMAIL PROTECTED]> wrote:
> On Sat, Nov 22, 2008 at 5:01 AM, Andy Freeman <[EMAIL PROTECTED]> wrote:
> > I'd need to create a unique name to use to name an entity group
> > without using any datastore operations.
>
> I don't understand what you're trying to do. Entity groups don't have names.
>
> Dave.
--~--~---------~--~----~------------~-------~--~----~
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-appengine@googlegroups.com
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