I got a need to serialize the object out as XML, but current persistent entity gives too much unrelated stuff. I can't break out of current transaction to get to detached object because it is needed in another step.
So, I just wonder if any of you see the same problem and has a work-around solution to share.
I use the fast XStream to write it out to xml.
solution: Got to write your own clone() in the object and each dependent ones, so that the cloning process will do traversing down the tree to each containing object. You will have the whole obj structure back, then to XML it goes.