I have a model Comments. I want to implement a function that user can comment a comment, and I think it’s a one-to-many relation, you know, one comment can have some comments. Then I put
comments = db.ReferenceProperty(Comments,collection_name="comments",required=False)
into my Comments model, but it doesn’t work.
Can a model reference to itself in google appengine datastore? Is there any other hint?
Thank you!
Use
db.SelfReferencePropertyto model a reference to another instance of the same kind.