nvarchar2

Description

Hello,

When using Oracle with columns of type NVARCHAR2, the reverse engineering tool maps the columns with a java attribute of type Serializable. We would prefer to have these columns mapped to String. However NVARCHAR2 has no corresponding JDBC type, so recognizing this type by Java would imply to verify the JDBC type and if the JDBC type is unknown then verify the type name and if it's VARCHAR2 than map it to String. Do you think it's a possible solution?

For now, we are doing the following in the reverse-eng.xml file, but it's not very neat since it maps all the "OTHER" types to String:
<type-mapping>
<sql-type jdbc-type="OTHER" hibernate-type="String" />
</type-mapping>

Link on Oracle listing the unsupported Oracle type:
http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/apxref.htm#sthref2055

Link explaining the use of String with NVARCHAR2:
http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/global.htm#sthref1624

François Jean

Environment

Oracle 10g release 2

Activity

Show:

Koen AersDecember 5, 2024 at 1:23 PM

I am closing this issue as the last relevant update was in 2007. Please feel free to reopen if you feel that this is still relevant.

Max Rydahl AndersenNovember 27, 2007 at 7:32 PM

slip

Hameem Mohamed MohideenNovember 16, 2007 at 2:35 PM

what will be the solution for this issue. If we mention the table name, column and type in the reverse-engineer file as below it is creating mapping file with the type string.

<table name="" schema="">
<column name="" type="string" ></column>
</table>

Is it a right way .....?

Max Rydahl AndersenAugust 3, 2007 at 4:01 PM

slip to next

Max Rydahl AndersenNovember 14, 2006 at 3:19 PM

more or less yes.

Won't Fix

Details

Assignee

Reporter

Participants

Francois Jean
Hameem Mohamed Mohideen
Koen Aers
Max Rydahl Andersen

Fix versions

Affects versions

Priority

Created May 5, 2006 at 5:30 PM
Updated December 5, 2024 at 1:23 PM
Resolved December 5, 2024 at 1:23 PM