Hi Kennedy,
             For ORACLE Sequence:(no need to change anything repository_user.xml).Just 
generate sequence and a trigger as follows for your table:
CREATE SEQUENCE <sequence name>

START WITH 1
INCREMENT BY 1
NOMAXVALUE;


CREATE TRIGGER <some name>
BEFORE INSERT ON <your table name>
FOR EACH ROW
BEGIN
SELECT <sequence name>.NEXTVAL INTO :NEW.<your table primary key> FROM DUAL;
END;
/
For OJB AUTOINCREMENT:you need to set repository_user.xml as follows
 
<class-descriptor
      class="com.cit.ojb.<form bean name>"
      table="<table name"
   >
      <field-descriptor id="1"
         name="<variable in your form bean class>"
         column="<feild name in your table>"
         jdbc-type="INTEGER"
         primarykey="true"
         autoincrement="true"
      />

- - - - - - 

- - - - - 

 - --

if it works just reply me.

Regards

Dhamu

 

 Ryan Kennedy <[EMAIL PROTECTED]> wrote: For some reason I can't seem to get the Oracle 
sequence manager to work. I
have the following in my OJB.properties:


SequenceManagerClass=org.apache.ojb.broker.util.sequence.SequenceManagerOracl
eImpl

I have this in my repository_user.xml:



I construct a new Job object and call broker.store(job); to persist it to the
database. When I do that, I get the following exception:

java.lang.Exception: sequence-name attribute is not defined in 
the class descriptor - Job

It appears that it can't find my sequence-name attribute, but I have it there
in my class descriptor. Any ideas?

Ryan Kennedy
Software Engineer
Jel, Inc.
web. www.jel.net

--
To unsubscribe, e-mail: 
For additional commands, e-mail: 




---------------------------------
Get a bigger mailbox -- choose a size that fits your needs.

Reply via email to