Hi Graham,
i posted some questions on this a couple of weeks ago, but got no reply.
Anyway, we are currently using the following mapping (partially according to
the Oracle documentation):
JDBC --> ORACLE (8.1.7)
----------- --------------
BIT --> NUMBER(1)
TINYINT --> NUMBER(3)
SMALLINT --> NUMBER(5)
INTEGER --> NUMBER(10)
BIGINT --> NUMBER(20)
DOUBLE --> NUMBER
REAL --> NUMBER
FLOAT --> NUMBER
NUMERIC --> NUMBER
DECIMAL --> NUMBER
CHAR --> CHAR
VARCHAR --> VARCHAR2
LONGVARCHAR --> LONG
DATE --> DATE
TIME --> DATE
TIMESTAMP --> DATE
BINARY --> RAW
VARBINARY --> RAW
LONGVARBINARY --> LONG RAW
CLOB --> CLOB
BLOB --> BLOB
Note that you cannot have zwo LONG or LONG RAW fields in a single table. So
you have to change ojb table OJB_DMAP_ENTRIES: both columns KEY_OID and
VALUE_OID are originally "LONGVARBINARY". I left KEY_OID as LONGVARBINARY,
thus LONG RAW, and changed VALUE_OID zu VARCHAR/2048, thus VARCHAR2(2048).
We use these JDBC types: VARCHAR, CHAR, BIGINT, TIME, DATE, LONGVARCHAR,
INTEGER, LONGVARBINARY with the mapping mentioned above. So far everything
seems to work properly.
"veryfiymappings" also keeps on giving me errors, but i could not figure out
why. I don't know what is happening behind the sceenes (other mapping tools
[crossDB] are used) and where the mapping are configured.
I don't know the proper way to generate DDL statements from the
repository.xml file, but would be interested in learning (currently we're
using a simple xsl file to generate the statements for creating tables an
primary keys).
Hope it was some useful info for you.
Regards
Max
> -----Urspr�ngliche Nachricht-----
> Von: Graham Lounder [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 15. Oktober 2002 13:18
> An: OJB Users List
> Betreff: Oracle JDBC Types
>
>
> Hey all,
>
> I'm currently setting up my second OJB project, this time
> with Oracle. In
> the database there are types such as NUMBER and VARCHAR2.
> What types are
> these mapped to? Currently I'm using INTEGER/DOUBLE and
> LONGVARCHAR. I'm
> asking this question because I'm using the Ant task
> 'verifiymappings' and it
> is giving me lots of warnings that the types are not the same.
>
> Any Ideas?
>
> Thanks in advance,
> Graham
>
> ============================================
> Graham Lounder
> Java Developer
> Spatial Components Division
> CARIS
> 264 Rookwood Ave
> Fredericton NB E3B-2M2
> Office 506 462-4263
> Fax 506 459-3849
> [EMAIL PROTECTED]
> http://www.spatialcomponents.com
> ============================================
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>