Hi Vaninho, If you want to group some A, B & C entities in the same entity group, you have to say (for example) that A is a parent of B (via a @Parent Key<A> key in B) and then that B is a parent of C (via a @Parent Key<B> in C).
You can add @Transient if you don't want the Keys to be stored as properties of the entity Then you can query with ancestor() filter. regards didier On Nov 22, 9:10 pm, Jeff Schnitzer <[email protected]> wrote: > This doesn't make any sense; entities in the GAE datastore cannot have > multiple *parent* keys. However, your structure would work fine if > you just dropped the @Parent annotation. > > This may help: > http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys > > Jeff > > On Mon, Nov 22, 2010 at 10:22 AM, vaninh0 <[email protected]> wrote: > > Hi Didier, > > > with Objectify is possible to create a Entity with two distinct > > childrens? > > > example: > > > class A { > > @Id Long Id; > > } > > class B { > > @Id Long Id; > > } > > class C { > > @Id Long Id; > > @Parent Key<A> a; > > @Parent Key<B> b; > > } > > > regards, > > vanio. > > > On 20 nov, 14:41, Didier Durand <[email protected]> wrote: > >> Hi, > > >> I would recommend Objectify (which I use heavily): seems to match your > >> need. > > >> regards > >> didier > > >> On Nov 20, 1:20 pm, Roberto Saccon <[email protected]> wrote: > > >> > maybe a good place to start is sourcecode of lowlevel-based frameworks > >> > like slim3 or objectify > >> > -- > >> > Roberto > > >> > On Nov 20, 8:13 am, Tom <[email protected]> wrote: > > >> > > Hi there, > > >> > > I'm searching for information of entity relation ships in appengine. > >> > > JPA for example supports relations between entites (one-to-one, > >> > > ont-to-many, many-to-many). As far as I know by know the underlying > >> > > datastore doesn't direktly support this and not join queries (different > >> > > entities). > > >> > > How do you store Customer -> Orders in the datastore? Is there low > >> > > level API example code? > >> > > Would I store an entity "Customer" with attributes and a list of order > >> > > ids? > > >> > > Any help highly appreciated. > >> > > Thanks > >> > > Tom > > > -- > > 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 [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/google-appengine-java?hl=en. > > -- 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 [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-java?hl=en.
