Hi Mike,
think I don't understand your problem (never used insert trigger), so be patience. If you are using a insert trigger I assume the trigger set the PK value on insert of new objects? Or do you using a stored procedure to get the key or to insert the whole object?
OJB supports database generated sequences. A sequence manager supporting this kind of key generation can be found here:
http://db.apache.org/ojb/docu/guides/sequencemanager.html#Database+sequences+based+implementation
The SequenceManagerNativeImpl supports database identity columns, don't know if Oracle supports this (the exception indicate it doesn't).
regards, Armin
Mike Jackson wrote:
Actually I take it back, I was getting a -2, but when I got the attributes on the identity column set properly I'm getting a "java.lang.UnsupportedOperationException: This feature is not supported by this implementation". Perhaps this is the wrong sequence manager to use on oracle?
--mikej -=----- mike jackson [EMAIL PROTECTED]
-----Original Message-----
From: Mike Jackson [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 2:45 PM
To: 'OJB Users List'
Subject: Sequence managers and insert triggers
I'm running on an Oracle database (8i) with insert triggers to create artifical keys for my table records. The howtos seemed to indicate that SequenceManagerNativeImpl might be the proper sequence manager to use but the keys are coming out goofy, so clearly I'm not understanding or something. Which of the sequence managers should I be using? I've got other applications using the same database, so removing the triggers and using the native sequences via OJB isn't an option at this time.
--mikej -=----- mike jackson [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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
