Skip to content Skip to sidebar Skip to footer

Selfreferenceproperty Question

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.

Solution 1:

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

Post a Comment for "Selfreferenceproperty Question"