• 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: Stirling Olson <email@hidden>
  • Date: Thu, 12 May 2005 23:02:10 -0600

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.

Thanks,
Stirling


On May 12, 2005, at 10:42 PM, Karl wrote:

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





_______________________________________________ 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: Anjo Krank <email@hidden>
References: 
 >Making changes to EO after validation? (From: Stirling Olson <email@hidden>)
 >Re: Making changes to EO after validation? (From: Anjo Krank <email@hidden>)
 >Re: Making changes to EO after validation? (From: Karl <email@hidden>)

  • Prev by Date: Re: Making changes to EO after validation?
  • 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