Author: mat106 | Posted on: 10/12/2008 11:56:08 PM | Views : 328

HiI'm trying to implement Unit of Work (http://martinfowler.com/eaaCatalog/unitOfWork.html) as described  in Patterns of Enterprise Application Architecture, PoEAA (http://martinfowler.com/books.html#eaa) by Martin Fowler but i can't figure out how to correctly register objects as dirty with the unit of work. I'm using Data Mappers as described in the same book in order to load from/persistent to the database. The snippets of code below is what i have so far.The problem i'm having is the following:As stated in the text, "With object registration...the usual trick is to place registration methods in object methods. Loading an object from the database registers the object as clean; the setting methods register the object as dirty..." As such within the property setters of the domain objects i am calling markDirty(). This should work OK once that domain objects have already been populated from the database and are being manipul ...

Go to the complete details ...