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

Hameem Mohamed Mohideen (JIRA) noreply at atlassian.com
Fri Nov 16 07:35:29 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28850 ] 

Hameem Mohamed Mohideen commented on HBX-656:
---------------------------------------------

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

> nvarchar2
> ---------
>
>                 Key: HBX-656
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-656
>             Project: Hibernate Tools
>          Issue Type: Improvement
>          Components: reverse-engineer
>    Affects Versions: 3.1.beta5
>         Environment: Oracle 10g release 2
>            Reporter: Francois Jean
>             Fix For: 3.2.0.GA
>
>
> 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