1. A "default" PK generation strategy is thread-safe within a JVM.
Most adapters (except for generic JdbcAdapter) also implement proper
locking for cross-JVM concurrency.
2. 'Auto-increment' (aka "Database-Generated" PK) strategy is
supposedly thread-save (but its behavior depends on the database, not
Cayenne):
http://objectstyle.org/confluence/display/CAYDOC/Generated+Columns
3. 'Custom Sequences' strategy only works if the default strategy for
a given adapter is also a sequence. And of course it is thread-safe.
Andrus
On Mar 31, 2006, at 6:38 PM, Mike Kienenberger wrote:
On 3/31/06, Craig Turner <[EMAIL PROTECTED]> wrote:
I notice there's an 'auto-incremented' feature for primary keys in
the
modeler - is this thread-safe? Also, would it be possible for us
to be
able to manage custom sequences through the cayenne modeler in a
future
version?
Support for sequences predates support for auto-incrementing fields.
Only certain databases support sequences though.
Auto-increment and sequences as well as database-independent (pk
table) primary key generation are supported in the current modeler.