[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-656) nvarchar2

Francois Jean (JIRA) noreply at atlassian.com
Fri Sep 15 08:50:24 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-656?page=comments#action_24495 ] 

Francois Jean commented on HBX-656:
-----------------------------------

Are you suggesting adding the XML tag <db-type>, which would let us write the following reverse-engineering snippet?

...
<type-mapping>
    <sql-type db-type="NVARCHAR2" hibernate-type="String" />
</type-mapping>
...

> nvarchar2
> ---------
>
>          Key: HBX-656
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-656
>      Project: Hibernate Tools
>         Type: Improvement

>   Components: reverse-engineer
>     Versions: 3.1.beta5
>  Environment: Oracle 10g release 2
>     Reporter: Francois Jean
>      Fix For: 3.2beta8

>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira





More information about the hibernate-issues mailing list