I’m just starting with Google App Engine, and I’m a bit confused at the first datastore example in the tutorial.
In this example, each time a greeting is put in the datastore, its parent is set to a key built from the guestbook name :
greeting = Greeting(parent=guestbook_key(guestbook_name))
with
def guestbook_key(guestbook_name=None):
"""Constructs a datastore key for a Guestbook entity with guestbook_name."""
return db.Key.from_path('Guestbook', guestbook_name or 'default_guestbook')
What bugs me is that the guestbook_name itself is never explicitly put in the datastore. So are the greetings children of something that is not in the datastore ? Or is the guestbook_name somehow stored automatically ?
The example also says:
Also, from: http://khaidoan.wikidot.com/google-app-engine-datastore-entity-group