Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mapping XML datatype to JPA Entities  RSS feed

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have a column in Oracle database and is of XMLDataType and I need to now map that to an attribute in my JPA entity. Is this possible? As far as the JPA specification goes, I 'm thinking of considering CLOB. Am I right?
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is some info here:
http://en.wikibooks.org/wiki/Java_Persistence/Advanced_Topics#XML_Data_Types

You could just try to map it in JPA as a Basic using a String type, this might work.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!