Deleting in EOF
Usually deleting is pretty easy:
Person person; EOEditingContext ec = person.editingContext(); ec.deleteObject(person); ec.saveChanges();
A little more robust example:
Person person; /Assume is an EO that exists
EOEditingContext ec = person.editingContext();
ec.deleteObject(person);
try {
ec.saveChanges();
} catch (Exception e) {
ec.revert(); }
NOTE: These examples assume that correct EOEditingContext locking is occuring, ProjectWonder's ERXEC auto-locking is highly recommended.