Re: localInstanceOfObject not working on unsaved objects?
Re: localInstanceOfObject not working on unsaved objects?
- Subject: Re: localInstanceOfObject not working on unsaved objects?
- From: Fabian Peters <email@hidden>
- Date: Sat, 30 Sep 2006 15:22:57 +0200
Hi Jean Pierre,
See <http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/
Using_EOF/EO_Editing_Context>
This has been taken from a long thread on this topic back in may:
<http://lists.apple.com/archives/Webobjects-dev/2006/May/msg00615.html>
HTH
Fabian
Am 30.09.2006 um 15:10 schrieb Jean Pierre Malrieu:
Hi,
here is the code:
EOEditingContext ec1 = new EOEditingContext();
EOEditingContext ec2 = new EOEditingContext();
EntityA a = new EntityA();
ec1.insertObject(a);
EntityA local_a = (EntityA) EOUtilities.localInstanceOfObject
(ec2,a);
At the end of this code, local_a is null.
That is: localInstanceOfObject returns null if the original object
has not been saved to the database.
if I do:
EOEditingContext ec1 = new EOEditingContext();
EOEditingContext ec2 = new EOEditingContext();
EntityA a = new EntityA();
ec1.insertObject(a);
ec1.saveChanges();
EntityA local_a = (EntityA) EOUtilities.localInstanceOfObject
(ec2,a);
Then local_a is NOT null, as expected
This happens to me on WO 5.3.2 (xcode 2.4) on MacOSX.
Could someone confirm this?
If this is really what happens, isn't this a bug?
Thanks.
JPM.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40e-lumo.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