You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Rupinder Singh Mazara <rs...@ebi.ac.uk> on 2003/07/21 16:02:06 UTC

Newbie : How to generate Primary Keys

Hi All

 I am currently exploring OJB for use in my application,
 One major concern that I have is how to generate the primary key !
 WE have a table  as follows
  Create table xRef {
            XRefID Varchar2(10) Primary Key
            .... )


Values for XRefID are generated by a function  getNextRefID , this function
takes the NEXTVAL from a SEQUENCE SQ_GEN_REF_ID and append is to "REF_ID"

Therefore the data in the primary key column looks like PEF_ID0002304,
PEF_ID0002305 etc

 Question 1 : Can I get OJB to generate a similar primary based on the
function  getNextRefID
Question 2 : How  can it be achieved ? ( I  hope it can  )


regards



Rupinder Singh Mazara




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org