Oracle, Unicode, Hibernate mapping

292 views
Skip to first unread message

Graham Bakay

unread,
Sep 2, 2015, 3:36:06 AM9/2/15
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.

Brian Kotek

unread,
Sep 2, 2015, 9:47:17 AM9/2/15
to cf-or...@googlegroups.com
Hibernate itself supports these types (https://docs.jboss.org/hibernate/orm/4.3/devguide/en-US/html/ch08.html#value-national-character-types). So it looks like this is something the CF team would need to add support for.


Graham.

--
You received this message because you are subscribed to the Google Groups "cf-orm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cf-orm-dev+...@googlegroups.com.
To post to this group, send email to cf-or...@googlegroups.com.
Visit this group at http://groups.google.com/group/cf-orm-dev.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages