Re: Strange localInstanceOfObject behaviour...

2006-06-01 Thread Mike Schrag
Not sure why this just sent again ... Odd. On May 31, 2006, at 4:31 PM, Mike Schrag 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

Re: Strange localInstanceOfObject behaviour...

2006-06-01 Thread Mike Schrag
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

Re: Strange localInstanceOfObject behaviour...

2006-06-01 Thread Jerry W. Walker
Hi, Mark, On May 31, 2006, at 5:35 PM, Mark Ritchie wrote: localInstanceOfObject() uses EOEditingContext's faultForGlobalID() method. faultForGlobalID() should find a new, unsaved EO's which are: 1) registered in the receiving EOEditingContext 2) registered in the attached shared EOEditingCon

Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread Mike Schrag
Good point -- Thanks for the correction. I should have prefixed with "in the general case" rather than the bare "you can't" :) I almost always end up using independent peer editing contexts and as a result I don't even consider that as an option. ms On May 31, 2006, at 6:01 PM, Mark Ritc

Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread Pierce T. Wetter III
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. :-) I thought I'd expand on that last sentence because localInstanceOfObject seems to confus

Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread Kieran Kelleher
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

Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread Mark Ritchie
On Wednesday, May 31, 2006, at 05:37PM, Mike Schrag <[EMAIL PROTECTED]> 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 edi

Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread Mark Ritchie
On Wednesday, May 31, 2006, at 04:24PM, Kieran Kelleher <[EMAIL PROTECTED]> wrote: > I have a newly created object in an editing context and I am making a local > instance of it in a another editing context . however > localInstanceOfObject always returns null!! What gives?! Hi Kieran, loc

Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread Mike Schrag
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

Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread apl
Hello Kieran; This is an interesting idea to name the thread with the wosid. I see your 'job' instance has a temporary GID -- I don't think I have ever transferred an EO between EC's unless it were first persisted. Just taking a wild guess here, but I'd assume there were no snapshots wait

Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread Chuck Hill
Has the object been saved? You can only use localInstance on a saved EO. Chuck On May 31, 2006, at 1:09 PM, Kieran Kelleher wrote: I think I am losing my mind I have a newly created object in an editing context and I am making a local instance of it in a another editing context .