Detecting a deleted object
Detecting a deleted object
- Subject: Detecting a deleted object
- From: Miguel Arroz <email@hidden>
- Date: Sat, 18 Feb 2006 21:26:02 +0000
Hi!
Imagine the following code (I'm writing this directly on the
email, it's possible that it contains errors):
EOEditingContext myContext = getMyContexy();
MyClass myObject = giveMeSomeObjectOfMyClassSotredOnTheDataStorage
(myContext);
myContext.deleteObject(myObject);
myContext.saveChanges();
Right after this, what exactly is myObject? Is there a way to know
that it references a previously deleted object? The only way I can
find is calling myObject.editingContext() and catch a
NullPointerException, but that method is very very dirty... is there
a better way?
Yours
Miguel Arroz
"We have no sympathy for the lost souls
We've chosen the path of disgrace
We give this life to our children
And teach them to hate this place" -- Apocalyptica, Life Burns!
Miguel Arroz
http://www.ipragma.com
_______________________________________________
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