• 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: Problem with nested editing contexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with nested editing contexts


  • Subject: Re: Problem with nested editing contexts
  • From: Guido Neitzer <email@hidden>
  • Date: Mon, 26 Mar 2007 12:50:22 -0600

On 26.03.2007, at 11:16, Chuck Hill wrote:

to avoid null pointer exceptions all over the place (and/or to avoid having to write lots of code to check that the relationships were non-null). I took the following steps:

You should never need to worry about that. If the to-many relationships are null, you have overridden awakeFromInsertion (and / or awakeFromFetch) and failed to call super.awakeFromInsertion / awakeFromFetch. EOF automatically sets these to empty arrays in the super implementation.

What I do to help preventing that, is creating awakeFromInsertion and awakeFromFetch in my EOGenerator template as a method stub that only calls super() and has a comment for "initialize your object here ...". So I only have to put in the code at that place and can't possibly forget to call super().


cug
_______________________________________________
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: 
 >Problem with nested editing contexts (From: Steven Mark McCraw <email@hidden>)
 >Re: Problem with nested editing contexts (From: Chuck Hill <email@hidden>)
 >Re: Problem with nested editing contexts (From: Steven Mark McCraw <email@hidden>)
 >Re: Problem with nested editing contexts (From: Chuck Hill <email@hidden>)
 >Re: Problem with nested editing contexts (From: Steven Mark McCraw <email@hidden>)
 >Re: Problem with nested editing contexts (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Problem with nested editing contexts
  • Next by Date: Re: Strange _EOCheapCopyMutableArray crash
  • Previous by thread: Re: Problem with nested editing contexts
  • Next by thread: Re: Problem with nested editing contexts
  • Index(es):
    • Date
    • Thread