Refresh Operation

The refresh operation of an MBO allows you to refresh the MBO state from the client database.

For example:

Customer *cust = [Customer findById:101];
cust.fname = @"newName";
[cust refresh]; // newName is discarded
Note: If refresh is called on an MBO object before it has been created in the client database, the object may be left in an inconsistent state, or an exception may be thrown. Prevent this from occurring by adding code to your application that only calls refresh on an object that was previously created or saved in the database. For example:
if (!(mboInstance.isNew))    
[mboInstance refresh];