hibernate - any imported serialized objects back with original pkeys

T

Timasmith

Hi,

I have serialized my object hierarchy to disk and which to restore the
objects, with their original primary keys, back into the database.

Essentially I rebuilt the database and want that set of data back where
it was. I dont want to generate new primary keys.

If I save my object with session.save the top/parent object generates
an insert but with the child it generates an update which fails with

StaleObjectStateException


Any easy way to do this?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top