|Restore from history [message #873158]
||Thu, 17 May 2012 15:55
| Sam Ratcliff
Registered: September 2011
We are using Eclipselink with the history customizer and the historical queries are working well. However, I was wondering whether a historical version can be restored easily.
I.e. if an entity is deleted and subsequently needs to be restored without loosing the work performed since the delete (so a database restore isn't acceptable) and not corrupting the history (the history shows it was deleted then restored).
I realise it is possible by reading from the history table and then persisting new objects with the relevant data. However, I doubt it is possible to get the primary keys to match (for the historical trace) if using the identity generator. You couldn't "merge" or "persist" with a set primary key as it would require IDENTITY_INSERT to be enabled. Additionally this would be a pain for an object with relationships to other objects which were also deleted at the same time (e.g. restoring a customer and all the related address, payment details, orders, etc).
I ask as in wiki.eclipse.org/EclipseLink_Exception_Error_Reference_(ELUG) the explanation for ECLIPSELINK-06103 it suggests a restore is possible but I am a bit confused as to what exactly is required.
Powered by FUDForum
. Page generated in 0.10298 seconds