cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Álvaro Martínez <>
Subject Selective commit
Date Mon, 07 Jan 2008 12:44:06 GMT

Hi, I've been working for a while with Cayenne but never realized I had 
a problem... until I got a weird exception.

The fact is that I had been using context.newObject() and 
context.commitChanges() to create new rows in the database. But my 
application works with many threads, so global commits can (and in fact 
do) interrupt normal creation of objects. Thread A and Thread B are 
creating objects and filling their fields, but then B commits all and A 
throws a validation exception because mandatory fields are missing.

How could I commit only one object?


Álvaro from Spain (Push the button Inc.)

View raw message