Re: Making changes to EO after validation?
Re: Making changes to EO after validation?
- Subject: Re: Making changes to EO after validation?
- From: Anjo Krank <email@hidden>
- Date: Fri, 13 May 2005 07:12:46 +0200
Am 13.05.2005 um 07:02 schrieb Stirling Olson:
The 2x save was actually so I WOULDN"T screw up the cycle. Wasn't
optimal though because my updates weren't atomic which is why I
changed to just check validateUpdate() and if that succeeds then I
set the CashBox.balance and then saveChanges(). Presto, BUT but I
have to do it in all components that might have this happen instead
of just once in the EO.
Look, I'm not in the retail businessa nd I may not get your problem
correctly, but... a cashbox's balance is the amount of money that's
in it. If that is not enough, you'd have a set of notes saying "oops
there is 5c missing, frank", "here I took another 4c, jim" etc. So
the totalBalance is email@hiddenepacy.
Now at the end of the shift, you'd compare Shift.endingBalance to
totalBalance and see if *those* match.
In real live, your money in the Cachbox doesn't get magically
increased too, does it?
Anyway, you just don't modify stuff after validation, as it would
defeat the whole purpose (from the frameworks POV)
Cheers, Anjo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden