As long as i know Oracle has ROW ID fields and I meant you were using these ones as auto-increment.
We use Oracle-sequences for Id auto-generation, these must be generated by your DBAs and you need to know wht is the name of the sequences they generated.
In your repository.xml you assign sequences to your columns, as follows:
<field-descriptor id="1" name="fieldName" column="columnName" jdbc-type="DECIMAL" nullable="false" primarykey="true" autoincrement="true" sequence-name="SEQUENCE_NAME_FOR_TABLE" length="22" />
Also add following XML as inner-tag in 'jdbc-descriptor' tag.
<sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl">
<attribute attribute-name="autoNaming" attribute-value="false"/>
</sequence-manager>
cheers danilo
Hi Danilo,
I will try to explain a little better (forgive the errors... I�m brazillian... hehe :-) First: I�m not a DB expert. The DBA have done the all the sequences. They work perfect outside OJB. Well, considering that I have a Oracle Database Setup and OK, with sequences and all... right? My doubt is on OJB, when I try to use the store() method I get an java.lang.ClassCastException. Can you send the pieces of the repository_user and repository_database to me? I think my error is there, because the database is already in use at a long time, without problems in a Client/Server application. You can do that?
Thanks for the support!!! []�s
Ronald
----- Original Message ----- From: "Danilo Tommasina" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Tuesday, October 28, 2003 12:58 PM Subject: Re: Oracle Auto-Increment
Hi Roland,
using sequences works very well
cheers danilo
--------------------------------------------------------------------- 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]
-- Danilo Tommasina, Dipl. Ing. FH Telecom Software Engineer RCS Riskmanagement Concepts Systems AG Technoparkstrasse 1 CH-8005 Zuerich T: +41 1 445 29 08 [EMAIL PROTECTED] www.risksys.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
