Yes, I was not thinking of new objects either.  I guess that is another reason 
I prefer my way.  :-P

On 2/19/2014, 11:15 PM, "Paul Hoadley" wrote:

On 20/02/2014, at 4:55 PM, Dev WO 
<webobje...@anazys.com<mailto:webobje...@anazys.com>> 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?


--
Paul Hoadley
http://logicsquad.net/

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to