User development,

A new message was posted in the thread "howto setup jpa using oracle 10g 
unicode nvarchar2":

http://community.jboss.org/message/531916#531916

Author  : Michael Glöckner
Profile : http://community.jboss.org/people/michael.gloeckner

Message:
--------------------------------------------------------------
Hi Jaikiran,
 
thanks anyway. I found a first solution for my purposes. Im using the orm.xml 
file to make an attribute overwriting. This allows me to set the database 
dependend informations into the orm.xml file instead of make annotations 
directly to the string attributes in java code. The handicap of this solution 
is, that you have to do the overwriting for every single string attribute where 
you want to use nvarchar2.

<?xml version="1.0" encoding="UTF-8"?>

<entity-mappings
  xmlns="http://java.sun.com/xml/ns/persistence/orm";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm_1_0.xsd 
1_0.xsd"
  version="1.0">

    <package>com.factory.model</package>
    <entity class="Customer" access="FIELD" metadata-complete="false">
         <attribute-override name="description">
              <column column-definition="nvarchar2(255)"/>
         </attribute-override>
    </entity>
</entity-mappings>

Cheers,
Micha

--------------------------------------------------------------

To reply to this message visit the message page: 
http://community.jboss.org/message/531916#531916


_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to