Hi Édouard. This is a known issue -- at the moment, there is no good way to model trees in the datastore where all nodes are of the same type. As others have suggested, you can use more than one class with the same properties to do this, which should work for shallow trees. You may also be able to use unowned relationships, although it could be more work to maintain the hierarchy this way. Please let me know if you have any other questions on this. - Jason
On Mon, Sep 21, 2009 at 7:29 AM, Marton Papp <mapr...@gmail.com> wrote: > > Hi Édouard, > > Although I am not from Google, I have had the a similar problem once. > I guess it has to do something with the fact that the datastore > identifies the object by their path from the roor of the entity group > that they belong to. If you make two collection of the same type, > there will be no information stored in the datastore whether a given > child entity (of class B in your case) belongs to one collection or > the other. If you still want to use a similar structure, but avoid > duplication of code, you can create the B' and B" classes, by both of > them having a one-to-one relationship to your B class. Or you can try > to embed the B class into your B' and B" classes. > > Marton > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---