• Post Reply Bookmark Topic Watch Topic
  • New Topic

Conversion JPA entities to XML output

 
Amit Arora
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JPA for persistence and using Hibernate as persistence provider. I want to get XML output from query. This is supported in Hibernate by using following code:



Where this 'elem' is DOM4J element which is XML element. This is working fine when I am using hbm files for storing meta-data, but whem I am using JPA annotation for storing metadata, code is giving following error.



What would be the solution for getting the result in XML from JPA entity?
 
Amit Arora
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That has been fixed in the new release 3.3
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!