On 31/03/12 3:06 AM, Bruno René Santos wrote:
Hello all,
I am using now Cayenne 3.1M4 Snapshot and first let me just say that its
performance is much better than 3.0.1 (How did you do it? just curious) but
I am having a strange problem.
I am creating a web application with popups as item details where I use
child contexts in order to able to rollback changes on these popups without
ruining the level below the popup. One of the quirks we have, by client
request, is that any commit changes on any popup saves directly to the DB
but we still need to mantain the local roolback on each popup.
I suspect that Cayenne child nested contexts are not what you want to be using there. You
probably just want another plain vanilla context, but once you commit you might want to
copy any objects you just committed into the "parent" context (if they are
referred to there).
I can see that your code is going to get very messy if the "parent" object is
new and not yet committed to the database, but you open the popup and want to commit
those to the database with a join to the parent. Ugh.
Ari
--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A