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.