Re: Making changes to EO after validation?
Re: Making changes to EO after validation?
- Subject: Re: Making changes to EO after validation?
- From: Karl <email@hidden>
- Date: Fri, 13 May 2005 00:42:44 -0400
This sounds like the routine interference with the request / response
cycle.
You cannot adjust this cycle at all. Having to submit 2x suggests
that you have.
Karl
On 13-May-05, at 12:40 AM, Anjo Krank wrote:
Am 13.05.2005 um 03:59 schrieb Stirling Olson:
I have Shift and CashBox EOs. When I try to close out a Shift and
Shift.endingCashBoxBalance != CashBox.balance the validation fails
UNLESS a discrepancy note has been added to the Shift EO. What I
would like to do is to update the CashBox.balance but ONLY after
all other validations have occurred and have been successful.
This allows for me to keep the "old" CashBox.balance until all
other validation problems have been cleared up. I can trick this
behavior in the components by saving twice (i.e. updating
CashBox.balance and then doing a second saveChanges() if the first
succeeded) but what I'm trying to do seems to me like a business
logic problem and therefore I'd like to put it in my EOs and not
in the apps themselves. FYI: CashBox is related to Shift through
Shift.cashBox().
I don't really understand your problem: can't you just have a
Shift.endingBalance = Shift.endingCashBoxBalance +
email@hiddenepancy and check if *that* isn't equal to
CashBox.balance?
The purpose for the didSave stuff is mainly for logging or tracking
changes, like creating a new "TranslationTask" when a text has
changed or a "Change" item. In that case when you'd save, in
didSave you create your EO, create your object and *make damn sure
it can save* then save again.
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:
40mac.com
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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