Re: Local Instance of EO Problem
Re: Local Instance of EO Problem
- Subject: Re: Local Instance of EO Problem
- From: Joe Moreno <email@hidden>
- Date: Tue, 15 Apr 2008 17:27:57 -0700
Chuck,
Thanks. It looks like it turned out to be my bug. I "crossed my
streams" (editing contexts).
- Joe
On Apr 15, 2008, at 14:03:30, Chuck Hill wrote:
On Apr 15, 2008, at 1:09 PM, Joe Moreno wrote:
Chuck,
Upon closer examination, I am seeing that if an EO field was null,
then updated, but not saved, it seems that the unsaved, previously
null value, gets pushed into the snapshot 'cause I see the new,
unsaved value, appear when getting a local instance from a peer EC.
Peer or nested? You will see the unsaved value if doing
localInstance on a child EC.
Does that make sense, or, am I'm overlooking a bug in my code?
It does not make sense for a peer EC.
Chuck
On Apr 13, 2008, at 20:31:25, Joe Moreno wrote:
Chuck,
Yup, Sally is the new, unsaved, value. Somehow, I missed the fact
that localInstance only uses the snapshot values.
Thanks for pointing that out – it's a big help.
- Joe
On Apr 13, 2008, at 20:25:55, Chuck Hill wrote:
Is "Sally" a new (unsaved) value? localInstance uses the last
saved/fetched values from the snapshot, NOT the values in the EO.
Chuck
On Apr 13, 2008, at 8:18 PM, Joe Moreno wrote:
Hi All,
Eclipse 3.3.2
WOLips 3.3.5047
Mac OS X 10.5.2
WO 5.3.3
Not using WOnder
In the process of moving an EO from one EC to another it seems
to get changed.
Am I overlooking something obvious, here?
The following code:
public void setPerson(Person newPerson)
{
NSLog.debug.appendln("1. First name newPerson = " +
newPerson.firstName());
if (newPerson != null)
{
NSLog.debug.appendln("About to get local instance.");
newPerson = (Person)
EOUtilities.localInstanceOfObject(_pageEditingContext, newPerson);
}
NSLog.debug.appendln("2. First name newPerson = " +
newPerson.firstName());
_person = newPerson;
NSLog.debug.appendln("3. First name _person = " +
newPerson.firstName());
}
Products this output:
[2008-04-13 20:12:10 PDT] <WorkerThread0> 1. First name
newPerson = Sally
[2008-04-13 20:12:10 PDT] <WorkerThread0> About to get local
instance.
[2008-04-13 20:12:10 PDT] <WorkerThread0> 2. First name
newPerson = Joey
[2008-04-13 20:12:10 PDT] <WorkerThread0> 3. First name _person
= Joey
Thanks,
Joe
_______________________________________________
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
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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