jpa and object duplication/cloning
I have a request where i need to read a JPA object tree from a persistence context (a database on a machine) and persist it to an other (database on an other machine).
Objets i read from first machine have their IDs and when persisting to second machine, they overwrite objects with same IDs.
How can i persist a complete object tree without having to manually and recursively erase all IDs ? Not only it is tedious, but it is sometimes almost impossible to do. I would really love to get a more direct solution.