|
|
HibernateTemplate replicate()
Hi,
I have a requirement to move database records from one DB to another DB based on a criteria. In doing so, I need to copy all child object records as well. The parent table has relationships with many other tables.
I have an application which makes a connection to the live DB and the archive DB. I get a list of the parent objects (with the child records attached) from the live DB, and use the HibernateTemplate.replicate() method to replicate data over to the archive DB. This method allows me to keep the current identifier since the objects have the generator-class set to sequence.
This method does cascade to save the child objects - but not all. Please can someone elaborate on the use of this method. I haven't been able to find much documentation on it.
Any suggestions are appreciated.
Thanks,
~Afsheen |
|