We have a project with some special requirements, one of wich is getting data from a XMLType database column from an Oracle 10g database.
We have found an easy solution using JDBC, but it would drive the application a little messy, as all the data access is being done through JPA (the implementation used is EclipseLink).
We have done some research, and have found some solutions, as using Converters and other auxiliar types, but the implementations seemed a little complicated.
So, my question is:
Could you recommend me an easy way to map an XMLType data column to a Java Object type, using JPA?
Thanks in advance.
Did you try just mapping it as a String?
In EclipseLink you can also map it using a DirectToXMLTypeMapping using a DescriptorCustomizer (no annotation support yet), or using the Converter as you have done.