Inilah solusi yang mungkin:
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());
}
}
Ubah file konfigurasi Hibernate hibernate.cfg.xml:
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
dengan:
<property name="dialect">
iam.dirty.DialectForGkoloc
</property>