What you need is to specify a key generator in the mapping.

 

http://castor.exolab.org/key-generator.html

 

 

 

Thomas

 

 

-----Original Message-----

>From: Jean-Noël WALLEZ [mailto:[EMAIL PROTECTED]]

>Sent: Friday, January 04, 2002 7:02 AM

>To: [EMAIL PROTECTED]

>Subject: [castor-dev] Primary Key set by Trigger

>

>I'm testing castor with Oracle 817.

>I want to insert data into a table with a primary key generated with a trigger and a sequence.

>When I insert data without setting the identity ( oracle's trigger will do it for me ) I got an DuplicateIdentityException.

>Do I have to select next sequence number from oracle into my java code and set the primary key by myself.

> 

>thanks.

> 

>jena-noel wallez

> 

>

Reply via email to