• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: localInstanceOfObject not working on unsaved objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: localInstanceOfObject not working on unsaved objects?
      • From: Jean Pierre Malrieu <email@hidden>
References: 
 >localInstanceOfObject not working on unsaved objects? (From: Jean Pierre Malrieu <email@hidden>)

  • Prev by Date: localInstanceOfObject not working on unsaved objects?
  • Next by Date: Re: localInstanceOfObject not working on unsaved objects?
  • Previous by thread: localInstanceOfObject not working on unsaved objects?
  • Next by thread: Re: localInstanceOfObject not working on unsaved objects?
  • Index(es):
    • Date
    • Thread