• 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
localInstanceOfObject not working on unsaved objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

localInstanceOfObject not working on unsaved objects?


  • Subject: localInstanceOfObject not working on unsaved objects?
  • From: Jean Pierre Malrieu <email@hidden>
  • Date: Sat, 30 Sep 2006 15:10:57 +0200

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: localInstanceOfObject not working on unsaved objects?
      • From: Fabian Peters <email@hidden>
  • Prev by Date: Re: SVN, WOBuilder/WOComponents and Eclipse
  • Next by Date: Re: localInstanceOfObject not working on unsaved objects?
  • Previous by thread: Re: SVN, WOBuilder/WOComponents and Eclipse
  • Next by thread: Re: localInstanceOfObject not working on unsaved objects?
  • Index(es):
    • Date
    • Thread