Hibernate version:3.1
Hibernate Tools version:3.1.0 beta4a
Name and version of the database:Oracle 10g
Hi,
i genarted the .hbm.xml document for a table via Hibernate Tools. Defined my own UserType OracleCHAR (defined on
http://www.hibernate.org/90.html) and insert the reveng.xml the type mapping
Code:
<sql-type jdbc-type="CHAR" hibernate-type="mywork.OracleCHAR" />
The result is:
Code:
...
<key-property name="groupId" type="mywork.OracleCHAR">
<column name="GROUP_ID" length="40" />
</key-property>
...
When i start a testprogram, i get an exception:
org.hibernate.MappingException: No Dialect mapping for JDBC type: 999
at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:216)
at org.hibernate.mapping.Column.getSqlType(Column.java:181)
at org.hibernate.mapping.Table.sqlTemporaryTableCreateString(Table.java:302)
at org.hibernate.mapping.PersistentClass.prepareTemporaryTables(PersistentClass.java:661)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:199)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
....
I changed the .hbm.xml by hand to:
Code:
...
<key-property name="groupId" type="mywork.OracleCHAR">
<column name="GROUP_ID" sql-type="char" length="40" />
</key-property>
...
And my problem is solved.
What can i do, to generate the
sql-type attribute via reverse engineering???
Thanks for help,
Michael