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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For simple many-to-many relationships, use a
ListPropertywith 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