Hello All
I currently trying to use the cvs version of ojb 1.0 with an Oracle 9i
Database and I have a few problem with stored procedure and sequences:


1: I want to Stored procedure for insert some rows.
The stored procedure return the id ( primary key ) of the row.But i don't
know wich sequence manager i need to use for managing this class .

Here is the class descriptor:

<class-descriptor class="com.infovista.vm.ojb.Twtinstances"
table="VMUSER.TWTINSTANCES">
                <field-descriptor name="cdate" column="CDATE"
jdbc-type="TIMESTAMP"/>
                <field-descriptor name="configid" column="CONFIGID"
jdbc-type="BIGINT"/>
                <field-descriptor name="datasync" column="DATASYNC"
jdbc-type="BIGINT"/>
                <field-descriptor name="description" column="DESCRIPTION"
jdbc-type="VARCHAR"/>
                <field-descriptor name="id" column="ID" jdbc-type="BIGINT"
primarykey="true" />
                <insert-procedure name="ADDINSTANCE">
                        <runtime-argument field-ref="id" return="true"/>
                        <runtime-argument field-ref="description"
return="false"/>
                        <runtime-argument field-ref="datasync"
return="false"/>
                        <runtime-argument field-ref="configid"
return="false"/>
                </insert-procedure>
</class-descriptor>


But i don't find any way to use it correctly in ojb .
First i didn't define any sequence manager , the PB refuse to insert any
instance .
Second try : using the SequenceManagerNativeImpl ( not implemented for this
plateform ).




2: One other question concern the repository.dtd wich has the following
lines on the stored procedures:


<!ELEMENT insert-procedure (documentation?, (runtime-argument |
constant-argument)?, attribute*)>
<!ATTLIST insert-procedure
        name CDATA #REQUIRED
        return-field-ref CDATA #IMPLIED
        include-all-fields (true | false) "false"
>


A procedure could have one to many arguments , I just wonder if we should
have 

<!ELEMENT insert-procedure (documentation?, (runtime-argument |
constant-argument)+, attribute*)>
<!ATTLIST insert-procedure
        name CDATA #REQUIRED
        return-field-ref CDATA #IMPLIED
        include-all-fields (true | false) "false"
>





3: Is it possible to use different sequence manager in the same repository
??? If yes how ?


B.R


Thierry Hanot 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to