• 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: quick question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quick question


  • Subject: Re: quick question
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 20 Feb 2006 14:46:45 -0800


On Feb 20, 2006, at 2:41 PM, Michael DeMan wrote:

Does anybody know if:

validateForSave() calls validateForInsert() if an object is not in the database yet?

More correctly, EOF calls validateForInsert() if the method exists and the object has not yet been saved. Otherwise it calls validateForSave.


I need to do some transaction oriented stuff and want to validate all my object fields so I know its okay, execute a transaction on a 3rd party system, then insert/save my object.

Do you have a copy of Practical WebObjects?

I hope you don't mean insert in the sense of insertObject(). That should happen immediately after creation.


I was thinking that calling validateForSave() before my 3rd party transaction would work, but it seems to be calling validateForInsert () somewhere.

I don't think that is what happens...


I'm not 100% sure if it is, and if it is, whether that is the correct behavior or whether I have some custom validation code that is causing it to do that.

The easiest way to see is to add this to validateForIinsert:

NSLog.out.appendln(new RuntimeException("backtrace"));

and then look at the backtrace. Or be high tech and stop it in a debugger.

Chuck


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ 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
References: 
 >quick question (From: Michael DeMan <email@hidden>)

  • Prev by Date: Re: EOModeler code generation
  • Next by Date: Re: EOModeler code generation
  • Previous by thread: quick question
  • Next by thread: Re: quick question
  • Index(es):
    • Date
    • Thread