I've done archiving another way that worked pretty well.  Basically at the time 
you save the object you also create a new archive entry.  Seems a bit simpler 
than the approach you described.

HTH,
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]

Reply via email to