The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Davidorz (2) [Avatar] Offline
#1
page 304 listing 9.1
in the undoItemChanges() method
first call merge() method to attach the item entity, then call refresh() method to populate the item entity with data from database.

My question is that how can the refresh method get the old data from database since before the refresh method get called, the merge method has updated the database with the data from the current item entity?
reza_rahman (456) [Avatar] Offline
#2
Re: A question about chapter9
David,

This has been discussed a few times before. Kindly look at a few previous threads on the topic (it might be an older thread so you'll need to look closely). If you are still having trouble, let us know.

Cheers,
Reza