Hi Armin,

Armin Waibel wrote:

Hi,

AFAIK DB2 supports both kinds of DB side key generation:
- use of identity columns via SequenceManagerNativeImpl
- use of database based key generation via SequenceManagerNextValImpl

I strongly recommend to use database based sequence generation in this case, because identity based key generation is not "extent aware", more info see sequence manager doc http://db.apache.org/ojb/sequencemanager.html#SequenceManager%20implementations


Guido, I don't know which SM you like to use, but the 'sequence-name' attribute has no effect when using SequenceManagerNativeImpl.


NextValImpl is ok for me. There is a database sequence at the pk column which caused my problem.
After setting the readonly attribute for the primary key column at the repository everything worked fine.
I had a db lock problem with db2 in former times when using NextValImpl but I think that is another problem.


I havn't find a way to get the sequence name from db2 yet. So setting the name would currently not work.
Without beeing able to access the db sequence the readonly attribute is the only choice.
Thanks for the hint!!


best regards,

Guido

regards,
Armin

Thomas Dudziak wrote:

On Mon, 5 Apr 2004, Guido Beutler wrote:


Hi Tom,

Readonly was a usefull hint. I removed the sequence name at the class descriptor and added a
readonly attribute. I still use nextVal sequence manager. This now works for me.
Thanks !!



I'm not sure that the sequence manager is used at all now. Please try the
SequenceManagerNativeImpl to see whether it works too as it seems to me
to be the more appropriate one in your case.


Tom


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to