Store all the parent ids as a hierarchy in a string... h="id1/id2/" h="id1/id2/id3" h="id1/id2/id3/id4" h="id5/" h="id5/id6"
You can then filter WHERE h > "id1/" and h < "id5/" to get all children of id1. Or you can use entity groups & ancestors. More details here... http://groups.google.com/group/google-appengine/browse_thread/thread/566d51bf807ae301/102a8f399d260d90#102a8f399d260d90 On Oct 31, 8:31 am, Chris Tan <[EMAIL PROTECTED]> wrote: > I'm wondering how other people have been modeling hierarchical > information > such as nested comments. > > My first thought was to do something like this: > > class Comment(db.Model): > reply_to = db.SelfReferenceProperty(collection_name="replies") > author = db.UserProperty() > content = db.TextProperty() > > However, this isn't scalable, as a query is made for every > comment in the thread. > > Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
