Hi,
I used Hibernate Tools 4.0.0 to generate POJO and hbm.xml files using a reveng.xml file from an Oracle 11 database.
I used : ojbdc6-11.2.0.3
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property> <property name="hibernatetool.metadatadialect">org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect</property>
all VARCHAR2 (CHAR) and NVARCHAR2 have an incorrect Length (x4)
I understand that 1 CHAR can contains 4 BYTES.
However, when I use the POJO to generate the schema (in Postgres or Oracle) all String fields are generated as VARCHAR2(CHAR) with the length in BYTES...
I checked the class org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect and the query: private static final String SQL_COLUMN_BASE actually looks for DATA_LENGTH in all_tab_columns.
I'm under the impression the query should looks for CHAR_LENGTH instead.
I appreciate any input you may have to help me to understand why DATA_LENGTH is used.
Thanks
Yannick
|