So just changing the order of operations was the trick? Perhaps it
should just be documented that you remove from relationships before
you delete from the context?
I'd say Cayenne should handle that. When I encounter quirks like that
in other frameworks, I tend to jump to quick conclusions about the
quality of a given framework. So this is one of those small things we
should fix to ensure that the user impression of Cayenne is always
"it just works" :-)
Andrus
On Oct 5, 2007, at 3:58 PM, Michael Gentry wrote:
So just changing the order of operations was the trick? Perhaps it
should just be documented that you remove from relationships before
you delete from the context?
I think the main reason I did it in the order I did was because, in my
test, right after that I had:
childContext.deleteObject((Detail) childM.getDetails().get(0));
childM.removeFromDetails((Detail) childM.getDetails().get(0));
If I had reversed the order, I'd have needed a variable to store
childM.getDetails().get(0). How is that for lazy? :-)
/dev/mrg
On 10/5/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote:
I committed a fix. Per my Jira comment there is a "correct" way to go
about it that requires a bit of object lifecycle redesign, but my
fairly straightforward workaround should work for this particular
case.
Andrus
On Oct 4, 2007, at 9:57 PM, Michael Gentry wrote:
I'm not sure if it matters, but in the test program I only pulled
the
Master object into the child DC. Is it important to pull the Detail
objects into the child DC as well? For some reason, I was under the
impression they would get pulled into the child DC automatically,
but
perhaps I am mistaken?
Thanks,
/dev/mrg