Skip to content

Instantly share code, notes, and snippets.

@rashidi
Created December 30, 2014 01:47
Show Gist options
  • Save rashidi/b4f9fc72ef644c40ad09 to your computer and use it in GitHub Desktop.
Save rashidi/b4f9fc72ef644c40ad09 to your computer and use it in GitHub Desktop.
Custom SQL Dialect
package my.zin.rashidi.dialect;
import org.hibernate.dialect.SQLServer2012Dialect;
import org.hibernate.type.StringType;
import static java.sql.Types.NVARCHAR;
/**
* @author Rashidi Zin
*/
public class CustomSQLServer2012Dialect extends SQLServer2012Dialect {
public CustomSQLServer2012Dialect() {
super();
registerHibernateType(NVARCHAR, StringType.INSTANCE.getName());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment