You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Annie Zhang <yh...@netzero.com> on 2002/04/01 02:00:05 UTC

How to deal with PK and Sequence in Oracle? How to generate XML schema from an existing DB(oracle)?

Hi,

I have 2 questions:

I'm using oracle and torque. What's the best approach to use sequence to generate PK ID ?

How to use ant task "project-jdbc" to generate torque's xml database schema from an existing DB(oracle)?

thanks in advance.

Annie



Re: How to deal with PK and Sequence in Oracle? How to generate XML schema from an existing DB(oracle)?

Posted by Annie Zhang <yh...@netzero.com>.
Robert,

Thank you very much.

Project-jdbc task can't work, it generate a empty XML file, even it reports
that generation is succeed. Faint!

Annie


----- Original Message -----
From: "Robert Morse" <rm...@mdesignz.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Sunday, March 31, 2002 6:21 PM
Subject: RE: How to deal with PK and Sequence in Oracle? How to generate XML
schema from an existing DB(oracle)?


> You would define a table like this:
>
> <table name="MY_TABLE" idMethod="native">
> <column name="PRIMARY_KEY_ID" required="true" autoIncrement="true"
> primaryKey="true" type="INTEGER"/>
> </table>
>
> This will create a table called 'MY_TABLE', and a column that is a primary
> key called 'PRIMARY_KEY_ID'.  It will also create an Oracle sequence
> MY_TABLE_SEQ, that will be used
> to generate the ID during an insert.
>
> I haven't used the project-jdbc task so can't help you there.
>
> -robert.
>
> -----Original Message-----
> From: Annie Zhang [mailto:yhzhang73@netzero.com]
> Sent: Sunday, March 31, 2002 4:00 PM
> To: Turbine Users List
> Subject: How to deal with PK and Sequence in Oracle? How to generate XML
> schema from an existing DB(oracle)?
>
>
> Hi,
>
> I have 2 questions:
>
> I'm using oracle and torque. What's the best approach to use sequence to
> generate PK ID ?
>
> How to use ant task "project-jdbc" to generate torque's xml database
schema
> from an existing DB(oracle)?
>
> thanks in advance.
>
> Annie
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: How to deal with PK and Sequence in Oracle? How to generate XML schema from an existing DB(oracle)?

Posted by Robert Morse <rm...@mdesignz.com>.
You would define a table like this:

<table name="MY_TABLE" idMethod="native">
	<column name="PRIMARY_KEY_ID" required="true" autoIncrement="true"
		primaryKey="true" type="INTEGER"/>
</table>

This will create a table called 'MY_TABLE', and a column that is a primary
key called 'PRIMARY_KEY_ID'.  It will also create an Oracle sequence
MY_TABLE_SEQ, that will be used
to generate the ID during an insert.

I haven't used the project-jdbc task so can't help you there.

-robert.

-----Original Message-----
From: Annie Zhang [mailto:yhzhang73@netzero.com]
Sent: Sunday, March 31, 2002 4:00 PM
To: Turbine Users List
Subject: How to deal with PK and Sequence in Oracle? How to generate XML
schema from an existing DB(oracle)?


Hi,

I have 2 questions:

I'm using oracle and torque. What's the best approach to use sequence to
generate PK ID ?

How to use ant task "project-jdbc" to generate torque's xml database schema
from an existing DB(oracle)?

thanks in advance.

Annie




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>