Hi Pau, if I understood correctly, your entities are connected by using reference properties.
B ref -> A C ref -> A D ref -> B E ref -> B etc etc In this case you should be able to get his direct childs in a very cheap way, buy using the the implicit proprieties created on the entity A (search:"Relationship Model" - link:http://code.google.com/appengine/articles/modeling.html ) an idea of this implementation is (in python): istanceOfA = db.Model.A().get(key) childs = [] childs.extend(istanceOfA.B_set) childs.extend(istanceOfA.C_set) logging.info(childs) Hope this help, Cesare On 10 May 2011 08:05, Pau <andos...@gmail.com> wrote: > > Hi, I create a hirarchy data in datastore using parents. For example: > A ... childs : B, C > B ... childs : D, E > C ... childs : F, G > > Now, I would like select childs of A using ANCESTOR IS, but the query return > all descendants (B, C, D, E, F and G). Do you know how I can retrieve only > the direct childs of A (B and C)? > > Thank you very much! > > Pau > > -- > 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. > -- 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.