I am trying to use google appengine. I have this model:
def Human(db.Model):
name = db.StringProperty()
friends = db.SelfReferenceProperty()
This Human has more than one friend. So, how to handle this with google appengine?
I am trying to use google appengine. I have this model:
def Human(db.Model):
name = db.StringProperty()
friends = db.SelfReferenceProperty()
This Human has more than one friend. So, how to handle this with google appengine?
For simple many-to-many relationships, use a
ListProperty
with a list of keys.If you need to store additional metadata, give the model its own relationship, e.g.
Friendship
.Examples of both can be found @ http://code.google.com/appengine/articles/modeling.html