Delete Operation

The delete operation allows the client to delete a new record in the local database. To execute delete operations on an MBO, get an instance of the MBO, set the MBO attributes, then call the delete operation. To propagate the changes to the server, call submitPending.

(void)delete

The following examples show how to perform deletes to parent entities and child entities.

Example 1: Supports delete operations to parent entities. The sequence of calls is:

SUP101Customer *customer = [ SUP101Customer find: 32]
[Customer delete];
[Customer submitPending];
[SUP101SUP101DB synchronize];

Example 2: Supports delete operations child entities. The sequence of calls is:

SUP101Sales_order *order = [SUP101Sales_order find: 32]
[order delete];
[order.customer submitPending]; //Call submitPending on the parent.
[SUP101SUP101DB synchronize];