Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Type conversion Oracle NVARCHAR2
Type conversion Oracle NVARCHAR2 [message #510109] Tue, 26 January 2010 15:01 Go to next message
Richard Wood is currently offline Richard WoodFriend
Messages: 29
Registered: January 2010
Junior Member
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 10:03 Go to previous message
Richard Wood is currently offline Richard WoodFriend
Messages: 29
Registered: January 2010
Junior Member
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: Fri Apr 19 12:13:49 GMT 2024

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

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

Back to the top