• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Making changes to EO after validation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 06:40:48 +0200


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: This email sent to email@hidden
  • Follow-Ups:
    • Re: Making changes to EO after validation?
      • From: Stirling Olson <email@hidden>
    • Re: Making changes to EO after validation?
      • From: Karl <email@hidden>
References: 
 >Making changes to EO after validation? (From: Stirling Olson <email@hidden>)

  • Prev by Date: Re: Help with Search, may require outer joins??
  • Next by Date: Re: Making changes to EO after validation?
  • Previous by thread: Re: Making changes to EO after validation?
  • Next by thread: Re: Making changes to EO after validation?
  • Index(es):
    • Date
    • Thread