cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: auto-incrementing non-primary key field value needed
Date Tue, 23 May 2006 23:20:48 GMT

On May 22, 2006, at 10:27 PM, Mike Kienenberger wrote:

> What's the best way to go about generating a non-primary-key
> auto-incrementing field value (unique, but eventually will be
> meaningful to the end users)?
> The database is Oracle (although I'd like it to work on HSQLDB too).
> Do I have to do this with a separate out-of-transaction database
> query, or is there some way I can make Cayenne assign a sequence value
> to this column?

Cayenne won't assign values to non-pk columns, but you can still  
reuse the Cayenne PK mechanism to obtain a sequence of values and set  
the values manually.


View raw message