You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Dominik Kreutz <dk...@startext.de> on 2005/12/01 13:17:03 UTC

Oracle issues (FAQ?)

Hello,

I need some clarification on the problems that Torque (and Village) is
having with Oracle.

>From archived messages of this list I know that there are issues regarding
BLOBs and DATE/TIMESTAMP and that some (all?) of the issues are solved (or
at least workarounds exist). I also know that there are patched version of
Village adressing some of the issues (and Oracle-BLOB issue, too).

Question: does "village-2.0.jar" that is delivered with "Torque-3.2-rc3"
include all the latest fixes (especially does it include same fixes as
"village-2.0-dev-oraclepatched-20041022.jar")?

Using latest generator "Torque-3.2-rc3" with Ant and running task "jdbc" on
Oracle-schema results in schema.xml where alls BLOB- and TIMESTAMP-colums
are mapped to VARCHAR. For each of such columns log-warning "SchemaType for
JdbcType '1111' is not defined: Defaulting to 'SchemaType[VARCHAR]'" is
shown.
Somewhere I read that wrong mappings can be fixed by changing some entries
in "db.prop", but I can't find this file (I suspect that it should be
located somewhere in generator's folder?)

I am using Oracle 9i and
http://db.apache.org/torque/runtime/oracle-howto.html states that in this
case I can use TIMESTAMP instead of TIME, but I don't understand what to do
exactly here. Maybe the Oracle-Howto page is simple outdated?

Maybe someone here can shed some light on these problem? I am willing to
compile my results and contribute it to the FAQ/Wiki. Thanks in advance.

Best regards,

  Dominik

-

--
Dipl.-Inform. Dominik Kreutz
startext Unternehmensberatung GmbH, Kennedyallee 2, D-53175 Bonn
Tel.: +49 (228) 95996-23, Fax: +49 (228) 95996-66
http://www.startext.de



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


Re: Oracle issues (FAQ?)

Posted by Dominik Kreutz <dk...@startext.de>.
Hi Thomas,

> No. The oraclepatched version is basically a branch off the
> village 2.0 and
> is only usable with oracle. There is no version of village that supports
> both oracle lobs and other databases. For working with lobs on oracle, you
> still need the oraclepatched version of village.

So in my case I need to replace village-2.0 with the oracle-patched version.

> I would not use the jdbc task for more complex datatypes. Development of
> this has lagged behind a lot, you need to check the results very
> carefully.
> ...
> <column name="SOME_TIMESTAMP" type="TIMESTAMP" />

OK. When I first use the jdbc-task and then rework it (replacing "wrong"
datatypes as needed) I should be on the safe side.

>   Hope this helps,

Yes, helped a lot.  I think your comments save me quite a bit of working
time (that I would have spent with trial-and-error).

Thanks and best regards,

  Dominik


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


RE: Oracle issues (FAQ?)

Posted by Thomas Fischer <fi...@seitenbau.net>.




"Dominik Kreutz" <dk...@startext.de> schrieb am 01.12.2005 13:17:03:

> Hello,
>
> I need some clarification on the problems that Torque (and Village) is
> having with Oracle.
>
> From archived messages of this list I know that there are issues
regarding
> BLOBs and DATE/TIMESTAMP and that some (all?) of the issues are solved
(or
> at least workarounds exist). I also know that there are patched version
of
> Village adressing some of the issues (and Oracle-BLOB issue, too).
>
> Question: does "village-2.0.jar" that is delivered with "Torque-3.2-rc3"
> include all the latest fixes (especially does it include same fixes as
> "village-2.0-dev-oraclepatched-20041022.jar")?

No. The oraclepatched version is basically a branch off the village 2.0 and
is only usable with oracle. There is no version of village that supports
both oracle lobs and other databases. For working with lobs on oracle, you
still need the oraclepatched version of village.

>
> Using latest generator "Torque-3.2-rc3" with Ant and running task "jdbc"
on
> Oracle-schema results in schema.xml where alls BLOB- and TIMESTAMP-colums
> are mapped to VARCHAR. For each of such columns log-warning "SchemaType
for
> JdbcType '1111' is not defined: Defaulting to 'SchemaType[VARCHAR]'" is
> shown.
> Somewhere I read that wrong mappings can be fixed by changing some
entries
> in "db.prop", but I can't find this file (I suspect that it should be
> located somewhere in generator's folder?)

I would not use the jdbc task for more complex datatypes. Development of
this has lagged behind a lot, you need to check the results very carefully.
The db.props files no longer exist in Torque 3.2. They are replaced by the
platform package in the generator, so any changes you would have done in
the db.props file for oracle you now would do in the java class
PlatformOracleImpl in the generator.

>
> I am using Oracle 9i and
> http://db.apache.org/torque/runtime/oracle-howto.html states that in this
> case I can use TIMESTAMP instead of TIME, but I don't understand what to
do
> exactly here. Maybe the Oracle-Howto page is simple outdated?

No, it isn't outdated. It simply states that if you are NOT using oracle9
and higher, you cannot use the timestamp data type without modifications to
the code. As you are using oracle9, timestamps work in the om and sql
tasks. I am using this myself. Simply put an entry like this in your
schema.xml:
<column name="SOME_TIMESTAMP" type="TIMESTAMP" />

  Hope this helps,

    Thomas


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