I am using the alpha version of the Hibernate 3 tools.
I am attempting to use a custom dialect for Oracle in order to handle the NVARCHAR2 Oracle type. I have created a subclass of the Oracle9Dialect class, added the constructor:
public Oracle10gDialectWithNVARCHAR2() {
super();
registerColumnType( Types.VARCHAR, "nvarchar2" );
}
I jar'ed this up, placed it in the org.hibernate.eclipse_3.0.0.alpha directory and edited the plugin.xml file. For good measure, I did the same thing in the org.hibernate.eclipse.mapper_3.0.0.alpha plugin directory.
I used my new dialect class in the hibernate.cfg.xml file. The generation occurs (and I know it is using my new class, because if I remove it from the plugin directory, I get an error when I attempt to generate). Everything appears to work fine, however the .hbm.xml files do not have NVARCHAR2 columns mapped to java.lang.String, but to java.lang.Object.
Am I barking up the wrong tree? I want the generation to create these column types as strings. Not sure what to do here...
|