Re: CommitChangesToParent() <> CommitChanges()

2017-02-23 Thread Hugi Thordarson
I don’t think this should be the case. Synchronization across contexts should only happen once objects have been committed to the DB. Running the following code generates the same output, regardless of whether OC synchronization is on or off: public static void main( String[] args ) {

Re: CommitChangesToParent() <> CommitChanges()

2017-02-23 Thread Musall, Maik
Well, as long as you leave global synchronization enabled, it doesn't really matter in which context you commit something, because every change gets propagated everywhere. IMHO it doesn't make sense to use parent/child contexts with that setting at all. Maik > Am 23.02.2017 um 09:38 schrieb M

Re: CommitChangesToParent() <> CommitChanges()

2017-02-23 Thread Markus Reich
Hi Maik, thx for your detailed and quick answer! Ok the thing with the ChildContext was my fault, although I should know better, shame on me :-/ But anyway the result of my test is the same. What I can verifiy is that when you commit sthg to a context, the child contexts gets synched immediatetl

Re: CommitChangesToParent() <> CommitChanges()

2017-02-23 Thread Musall, Maik
Hi Markus, > I'm having some troubles understanding commitChanges() and > commitChangesToParent() :-/ > > I've created a test case with two ObjectContexts > ObjectContext context1 = runtime.newContext(); > ObjectContext context2 = runtime.newContext(); Those two don't have a parent/child relatio

CommitChangesToParent() <> CommitChanges()

2017-02-22 Thread Markus Reich
Hi, I'm having some troubles understanding commitChanges() and commitChangesToParent() :-/ I've created a test case with two ObjectContexts ObjectContext context1 = runtime.newContext(); ObjectContext context2 = runtime.newContext(); then I load the same entity in both contexts PpAfkoPordershead