You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Gabriel Moreno <ga...@cs.cmu.edu> on 2001/06/17 00:37:32 UTC

oracle db.props (was: torque and oracle number data type)

I got the latest version of db.props for oracle from cvs. The problem
with the NUMERIC data type was solved (except for the problem of default
values for BigDecimal I mentioned in a previous email).

Now, there is another problem: in the latest db.props VARBINARY is
assigned as:
VARBINARY = RAW

The RAW type requires a size in oracle. So, when I try to create
application, there is a problem with Turbine's tables using VARBINARY
types without size. Either the problem is in the db.props and the
assignment should be something like:
VARBINARY = LONG RAW
or the problem is in turbine-schema.xml and it has to include the size
for the columns with VARBINARY type.

Thanks,
Gabriel

Gabriel Moreno wrote:

> Hi,
> How can I create a table with torque that has a column with datatype
> number(4) in Oracle?
> If I use DECIMAL or NUMERIC, it'll produce something like:
> CREATE TABLE mytable ( id (4) NOT NULL)
> it is not writting the datatype.
>
> If I use INTEGER, it'll produce something like:
> CREATE TABLE mytable ( id INTEGER(4) NOT NULL)
> which is invalid.
>
> I've seen that the conversions are in the file:
> conf/torque/templates/sql/base/oracle/db.props
> but I don't know what the impact of changing it is in the java code
> generated for the peers.
>
> Thanks,
>
> Gabriel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org


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


Re: oracle db.props (was: torque and oracle number data type)

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"Chris Campbell" <ca...@zodiacnetworks.com> writes:

> > The RAW type requires a size in oracle. So, when I try to create
> > application, there is a problem with Turbine's tables using VARBINARY
> > types without size. Either the problem is in the db.props and the
> > assignment should be something like:
> > VARBINARY = LONG RAW
> > or the problem is in turbine-schema.xml and it has to include the size
> > for the columns with VARBINARY type.
> >
> 
> Problem with LONG RAW is there can only be one per table in Oracle. I would
> suggest changing the turbine-schema so you don't limit your own tables to
> one varbinary

Indeed, Chris orates the truth.  When I found this out about Oracle, I
changed the JDBC/Torque VARBINARY type to map to a Oracle RAW, and set
the mapping for LONGVARBINARY to Oracle LONG RAW.  Gabriel, you are
correct that a SIZE parameter will have to be specified now when one
uses VARBINARY for a schema used with Oracle.  I realize that this is
not symmetrical with the mappings for MySQL, but thought that it would
be more flexible.  If you like, you could do what I did for some of
the other Oracle mappings and provide a SIZE which would be the
equivalent of a MySQL MEDIUMBLOB.  Thoughts on this?

Daniel Rall

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


Re: oracle db.props (was: torque and oracle number data type)

Posted by Chris Campbell <ca...@zodiacnetworks.com>.
> The RAW type requires a size in oracle. So, when I try to create
> application, there is a problem with Turbine's tables using VARBINARY
> types without size. Either the problem is in the db.props and the
> assignment should be something like:
> VARBINARY = LONG RAW
> or the problem is in turbine-schema.xml and it has to include the size
> for the columns with VARBINARY type.
>

Problem with LONG RAW is there can only be one per table in Oracle. I would
suggest changing the turbine-schema so you don't limit your own tables to
one varbinary

Chris Campbell



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