Excellent!  Thanks for the explanation.

Max Ross (Google) wrote:
Hi Rusty,

This is something we've planned to support all along, we just haven't gotten around to it yet. There's an issue filed for it here:
http://code.google.com/p/datanucleus-appengine/issues/detail?id=86

(already quite a few stars)

There are 2 things that make this work complicated. The first is explained in the above issue (no way to resolve unowned relationships inside a txn due to multiple entity groups). The second is that we need to start storing the Keys of the referenced objects in a list property on the parent. This is optional for owned relationships because we can use an ancestor query to find children (this is what we do now), but required for unowned relationships because there's no other way to store the relationship. This is one of the things I've been working on the last few weeks, and once this work is done it unlocks a ton of good stuff, including unowned relationships.

Max

On Mon, Jan 11, 2010 at 11:50 PM, Rusty Wright <[email protected] <mailto:[email protected]>> wrote:

    If I understand things correctly, it seems to me that a class would
    have a field

     @Persistent(defaultFetchGroup = "true")
     List<Key> myClassKeys; // keys are from MyClass objects

    instead of

     @Persistent(defaultFetchGroup = "true")
     List<MyClass> list;

    because in the latter case, when an object is added to the List,
    it's parented to the enclosing object.  In the case of the List of
    Key, no parenting happens so you can add keys for objects that are
    already parented or at the root level.

    Why can't you create an annotation parameter or new annotation so
    that we can use the latter form, and the annotation specifies that
    the objects' parenting remains unchanged?  So under the hood it
    behaves like the former List of Key, but it provides a cleaner
    interface like the latter.

    --
    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]
    <mailto:[email protected]>.
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:google-appengine-java%[email protected]>.
    For more options, visit this group at
    http://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.
-- 
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.


Reply via email to