-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Custom Dialect creation for XMLType usage
PostPosted: Thu Jul 04, 2013 9:09 am 
Newbie

Joined: Thu Jul 04, 2013 9:05 am
Posts: 1
Hello all,
in our project we want to store some data in table's field with type XMLType.
Our database is ORACLE, application server Glassfish4.

In our Entity class we want store data as String, below you can find code snippet:
Code:
    @Lob
    @Column(name = "XML_DATA")
    private String xmldata;


As I understand, we need to implement at least two classes:
1. Custom OracleDialect implementation (in our case, class must extends Oracle10gDialect)
2. Create class for OracleXMLType, implements UserType, Serializable

Also, in file persistence.xml we should setup the our dialect implementation, using
the following setting:

Code:
   <properties>
      <property name="hibernate.dialect" value="xxx.yyy.OracleDialectWithXmlSupport"/>

   </properties>


My question is, is it possible to implement this behavioir? As I see in forums,
all custom Dialect implementation works only with W3C Document class, but our requerements is to work with String.

Thank you in advance for responce.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.