cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Lendholt" <>
Subject Prevent of commit
Date Tue, 31 Jul 2007 13:26:51 GMT
Hey Folks,

another question:

I created an object via context.newObject(Service.class);

Before I do a context.commitChanges() I check if there are any input errors 
in the input fields that should be set to the object. If we encounter an 
exception, we abort the creation / editing of the current object.

Now, in the meantime, I take another window to create another object, like 
context.newObject(Person.class) and call the context.commitChanges().

Now, the old object, at which the check of the data failed, ist committed as 

Is there any method that prevents the commit of an object?
I just found context.unregisterObjects... is this the only possibility to 
prevent a commit?


We have a swing-app using the objects and passing them in constructor calls. 
If we encounter any problems upon editing this passed object and commit 
changes on another object, all party changed things will be committed as 
well, which is unliked by us.

I hope I could explain clearly.

Bye, Jan

Haben Spinnen Ohren? Finden Sie es heraus – mit dem MSN Suche Superquiz via  Jetzt mitmachen und gewinnen!

View raw message