Her er en mulig løsning:
package iam.dirty;
import java.sql.Types;
import org.hibernate.Hibernate;
import org.hibernate.dialect.SQLServerDialect;
public class DialectForGkoloc extends SQLServerDialect {
public DialectForGkoloc() {
super();
registerHibernateType(Types.DECIMAL, Hibernate.BIG_DECIMAL.getName());
registerHibernateType(-1, Hibernate.STRING.getName());
registerHibernateType(Types.LONGVARCHAR, Hibernate.TEXT.getName());
}
}
Rediger Hibernate-konfigurationsfilen hibernate.cfg.xml:
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
med:
<property name="dialect">
iam.dirty.DialectForGkoloc
</property>