I just realized my reply was unclear. I meant to say at the time you save your object you save then NEW state to the archive. This is simpler because you don't have to look up the old state of the object at the time of saving. And there is no condition where you should not save to the archive [in the other example you could not save to archive when the object is first created].
Nathan ----- "Rob Hills" <[EMAIL PROTECTED]> wrote: > Hi All, > > Using AppFuse 2.0 + Struts 2 + Hibernate > > I need to maintain archived versions of some of my entities. The > pattern I'd > like to implement involves saving a copy of the old version of an > entity (to > another table) just prior to persisting any updates to the entity. > > In the save(xx) method of my manager, before saving, I do a "get()" > with the > object's ID into a separate entity object with the idea that this > would give me > the old version from the database. However, it's actually returning > the > updated "dirty" version of the entity. I guess this makes sense, > because I'm > using the same manager. > > My question is, how do I go about getting the old version of the > entity at this > point? > > TIA, > Rob Hills > Waikiki, Western Australia > Mobile +61 (412) 904-357 > Fax: +61 (8) 9529-2137 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
