Hi,
I want to export Hibernate POJO to XML and vice verse. I am trying to use XStream as
xtream.toXML(//my POJO Object)
but my POJO class in complex. It has collection and recursive relation within objects. When I import this XML and want to persist POJO with hibernate, I face following issue
1. If ID already exist, hibernate complains. [Workaroung, I have set all id to null in xml]
2. Collection object can not be set.
3. Recursive relation are not setting.
Is there a better way to export/import POJO in xml, maintaining all relation in tact ?
I have followed steps from
http://constc.blogspot.com/2008/03/xstr ... rnate.html but still issue is same.
Any help is greatly appreciated.
Thanks,
Datta