This content has been marked as final.
Show 1 reply
-
1. Re: hibernate: MS-SQL Server and UTF-8
mars1412 Feb 27, 2008 6:36 AM (in response to mars1412)found the answer:
you have to create your own hibernate dialect and then set the correct column types:package mypackage; import java.sql.Types; public class SQLServerDialect extends org.hibernate.dialect.SQLServerDialect { public SQLServerDialect() { super(); registerColumnType(Types.CHAR, "nchar(1)" ); registerColumnType(Types.VARCHAR, "nvarchar($l)" ); } }
then use this dialect in your persistence.xml file:
see also http://forum.hibernate.org/viewtopic.php?t=972518&highlight=sql+server+nvarchar