Graham Bakay
unread,Sep 2, 2015, 3:36:06 AM9/2/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cf-orm-dev
Hi,
So I have NVARCHAR2 and NCLOB tables in my Oracle schema. The database default encoding is US7ASCII and the national encoding is AL16UTF16. I am using Oracle's JDBC driver (appropriate for the DB version, which is 11.2.0.3.0).
Using JVM settings -Doracle.jdbc.defaultNChar=true -Doracle.jdbc.convertNcharLiterals=true does force all SQL to default to use the database's National character set encoding (AL16UTF16). Unfortunately, I am not able to set these system properties in production.
Are there any mapping strategies to force Hibernate to recognize the columns as "N" datatypes and properly use the setFormOfUse() method in the driver to prevent the data for these columns being encoded in the database's default character set (US7ASCII)?
Alternatively, has anyone been able to set those properties in the "Connection String" field of the DataSource configuration in a way that is correctly interpreted when the driver is initialized? It doesn't work for me, for some reason.
Very frustrating dealing with N-datatypes. I don't understand why Hibernate can't glean this with its dialect.
Graham.