On 15 Nov, 2005, at 7:54 am, [EMAIL PROTECTED] wrote:
the .set() method ?
The real problem with the set method is it forces me to collect all
my changes in some other place before I can apply them to the model
object. This means my model object doesn't reflect the current state
and is worthless when passing to another method.
For example:
* Update employee's salary, paid days off, and job code (he got
promoted)
* pass employee object to computeLifeInsurancePremium method which
performs a bunch of calculations based on the employee's age, salary,
shoe-size, hair colour, etc.
* Further update employee object based on result of
computeLifeInsurancePremium.
* Save
If I rely on set, the employee object won't have up-to-date
information when passed to computeLifeInsurancePremium.
What makes this MUCH more interesting is when this happens as part of
a batch where I'm not entirely certain when to save. I can only save
when the entire batch is complete.
--
Jeff Watkins
http://newburyportion.com/
Computers, they're just a fad.