Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Type conversion Oracle NVARCHAR2
Type conversion Oracle NVARCHAR2 [message #510109] Tue, 26 January 2010 10:01 Go to next message
Eclipse UserFriend
Hello

I'm trying to make Eclipselink convert from NVARCHAR2 columns to java.lang.String
Say for example to store japanese characters.

It seems that Eclipselink supports this with Oracle platform support, ie class Oracle9Platform and the use of oracle.jdbc.OraclePreparedStatement.setFormUse(...)

The question is how do I activate it?

I'm using following annotations
@org.eclipse.persistence.annotations.TypeConverter(name = "nvarchar", dataType=org.eclipse.persistence.platform.database.oracle.NString.class, objectType=String.class )

@Basic
@org.eclipse.persistence.annotations.Convert("nvarchar")
@Column(name = "COMMENT", columnDefinition = "NVARCHAR2(1333)")


Thanks for any support
Richard
Re: Type conversion Oracle NVARCHAR2 [message #510331 is a reply to message #510109] Wed, 27 January 2010 05:03 Go to previous message
Eclipse UserFriend
To answer my own question

You need to specify the Oracle version in persistence.xml.
"Oracle" is not enough

<property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.oracle.Oracle11Platform"/>


Previous Topic:Howto call nontransactional Call in JTA Environment?
Next Topic:Problem with indirect (lazy) mappings
Goto Forum:
  


Current Time: Sun Aug 31 09:54:10 EDT 2025

Powered by FUDForum. Page generated in 0.03047 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top