• 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
Here's one newbie trap to avoid
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Here's one newbie trap to avoid


  • Subject: Here's one newbie trap to avoid
  • From: Scott Winn <email@hidden>
  • Date: Fri, 26 Jan 2007 16:29:18 -0800

EOUtilities.objectWithFetchSpecificationAndBindings
throws EOObjectNotAvailableException - if there is no matching object, so far so good.


You do a fetch with no results and get an EOObjectNotAvailableException. But watch out for. . .

EOUtilities.objectsWithFetchSpecificationAndBindings
it throws EOObjectNotAvailableException, but only if it can't find the fetch specification.


If you are used to the way object (singular) WithFetchSpecAndBindings behaves you are out of luck with this one. You do a fetch with no results and get no exception. You may have been expecting an EOObjectNotAvailableException, but you are never going to get it. Why didn't someone come up with an EONoFetchSpec exception instead? What does objectWithFetchSpecificationAndBindings throw if it can't find the fetch spec? Anything?

It's so subtle it is almost evil. Just glad I didn't waste too much time with it. One more newbie trap to avoid, but at least it is in the documentation.

Scott
_______________________________________________
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: Here's one newbie trap to avoid
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: daylight saving time problem
  • Next by Date: Re: Here's one newbie trap to avoid
  • Previous by thread: Re: PostgreSQL SQL generation
  • Next by thread: Re: Here's one newbie trap to avoid
  • Index(es):
    • Date
    • Thread