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.