• 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: Opinions on static createŠ() methods for EOs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opinions on static createŠ() methods for EOs


  • Subject: Re: Opinions on static createŠ() methods for EOs
  • From: Musall Maik <email@hidden>
  • Date: Fri, 21 Feb 2014 17:53:16 +0100


Am 20.02.2014 um 08:15 schrieb Paul Hoadley <email@hidden>:

On 20/02/2014, at 4:55 PM, Dev WO <email@hidden> wrote:

Someone will correct me if I'm wrong, but I think localInstanceIn is working only on an existing object in the datastore.
That means that if you create bar into ec2 and you try to do setBarRelationship(bar.localInstanceIn(ec1)) you will get a NullPointerException which could be difficult to track and debug if it happens in the eo class.

So I would recommend to not do it as a cross editingContext exception is "easier" to debug:)

Thanks Xavier, I had overlooked that.  That's going to be a complete show-stopper (in the general case), isn't it Chuck?

I’d leave it to the caller, too, but do an additional check if both EOs are in the same editing context, and throw an exception if they aren’t. 

Maik
 _______________________________________________
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: Opinions on static createŠ() methods for EOs
      • From: Paul Hoadley <email@hidden>
References: 
 >Opinions on static create…() methods for EOs (From: Paul Hoadley <email@hidden>)
 >Re: Opinions on static createŠ() methods for EOs (From: Chuck Hill <email@hidden>)
 >Re: Opinions on static createŠ() methods for EOs (From: Paul Hoadley <email@hidden>)
 >Re: Opinions on static createŠ() methods for EOs (From: Dev WO <email@hidden>)
 >Re: Opinions on static createŠ() methods for EOs (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: WOUnit testing with partial entities
  • Next by Date: Re: Calling AjaxModalDialog programmatically
  • Previous by thread: Re: Opinions on static createŠ() methods for EOs
  • Next by thread: Re: Opinions on static createŠ() methods for EOs
  • Index(es):
    • Date
    • Thread