What is the state of a "rollbacked" managed object?
What is the state of a "rollbacked" managed object?
- Subject: What is the state of a "rollbacked" managed object?
- From: Aurélien Hugelé <email@hidden>
- Date: Thu, 4 Oct 2007 09:58:10 +0200
Hi list,
I have a bug in my application and don't really know how to solve it:
Suppose my program follows the steps:
1/ save the moc
2/ insert a managed object
3/ the user can edit the managed object (attributes mostly)
4/ the user can validate or cancel via a button.
5/ when validating via OK button, the MOC is saved. When cancelling
via Cancel button, the MOC is sent a rollback message.
I *thought* that after the rollback, the managed object would be
deleted (at least would return YES to isDeleted message).
Unfortunately it is not the case: the managed object still exists, is
in "no state" (not inserted, nor deleted) and all its attributes/
relationship are nullified.
Rollback is supposed to return the MOC to its previous state. I
noticed that the managed object is "detached", it has no MOC.
can someone describe me what really happens to this managed object ?
is it supposed to be deleted ? detached from the MOC (then freed ?
when ?)
Thanks for any help.
Aurélien,
Objective Decision Team
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden