Re: Strange localInstanceOfObject behaviour...
Re: Strange localInstanceOfObject behaviour...
- Subject: Re: Strange localInstanceOfObject behaviour...
- From: Kieran Kelleher <email@hidden>
- Date: Wed, 31 May 2006 18:46:17 -0400
Thanks all, .... yes, I was doing local instance on an object from
one ec (where it was created) to a peer. The fact that this is not
allowed for new unsaved EO's was not obvious to me from the API and
in my mind, I thought I had done this before somewhere, but I
obviously had not! This is a nuance that I had not expected. Logic
changed ... problem solved. Thanks to all for the quick replies....
much appreciated.
Regards, Kieran
On May 31, 2006, at 6:01 PM, Mark Ritchie wrote:
On Wednesday, May 31, 2006, at 05:37PM, Mike Schrag
<email@hidden> wrote:
You can't localInstanceOfObject a new object (one that has not
been committed yet). There's no snapshot yet, so it would have
odd side-effects if they allowed you to do so (it would mean that
when you save both editing contexts, it would commit twice, i
would assume). Not sure if old versions of EOF let you, but it's
been this way for a while.
Um, sure you can... As long as the temporary object is registered
in a parent editingContext and your referencing it in a child
editingContext. It just works. This is the beauty of using a
child editingContext to play in, as your 'sandbox' if you like. You
can try out new object connections, configurations and settings
before deciding weather to commit the changes to the parent
editingContext. and then if your happy, you can commit the parent
editingContext to save the whole thing or ditch the parent if you
decide that it's not working out. You'd loose a lot of EOF's
abilities if this wasn't the case.
And just for fun, you can have multiple peer editingContexts which
all reference the temporary EO so long as the temporary object is
registered in an editingContext which is common to both peers. :-)
And yes, IIRC, this has worked back to EOF v2. I've tried to
forget EOF v1 and DBKit! ;-)
Regards,
Mark
__
Mark Ritchie
Diamond Lake Consulting Inc., Toronto Ontario Canada.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
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