Hi there I'm looking for a way to iterate through referenced entities in a template that are referenced as a list of keys rather than a reference property. For example:
ItemVar = db.GqlQuery("SELECT * from Items where Status = :1", "Active").fetch(100) for x in ItemVar: ChildrenVar = db.get(x.Children) I then want to iterate through the results of ItemVar and ChildrenVar in a template. The problem I'm having is that ChildrenVar is only filled with the last entity fetched for ItemVar. I've also tried setting up ChildrenVar as a list and appending it, e.g.: ItemVar = db.GqlQuery("SELECT * from Items where Status = :1", "Active").fetch(100) ChildrenVar = [] for x in ItemVar: ChildrenVar = ChildrenVar + db.get(x.Children) This works except the results don't appear to be tied to the initial parent entity in any way. Obviously I haven't set up 'Children' as a Reference property because there are multiple entities to be referenced. Also, I'm a total beginner so I don't know what I'm doing so small pieces of example code would be awesome!! Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---