Thanks for both suggestions. datanucleus is including the parent as
an object in each child:
> So do a JDOQL query for the elements
> pm.newQuery("SELECT FROM MyElement WHERE myParent == :parent");
> and pass in the parent object, and add on any other filter
> requirements.
That sounds to me like it would end up being a bidirectional
relationship with the children stored in a collection property of the
parent (that's what establishes the parent/child relationship), but
each child also stores the parent object in a property so it can be
queried. Seems like a fundamental Java issue (I should know) but is
there a problem in Java to store a Child object as a property of a
parent object, but then also store that parent object as a property of
the child? These aren't pointers to objects, but actual objects
right? Would it be better to just store the key of the parent in the
child as hsjawanda suggests? I'll have to look at the examples again.
I would like deleting the parent to automatically result in deleting
the multiple children. But I don't want deleting the children to
result in deleting the parent.
Regards,
Tim
--
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.