To execute update operations on an MBO, get an instance of the MBO, set the MBO attributes, and then call either the save() or update() operations.
Customer cust = Customer.findById(101); cust.setFname("supAdmin"); cust.setCompany_name("Sybase"); cust.setPhone("777-8888"); cust.save(); cust.submitPending(); <PkgName>DB.synchronize(); // or <PkgName>DB.synchronize (String synchronizationGroup)
To update multiple MBOs in a relationship, call submitPending() on the parent MBO, or call submitPending() on the changed child MBO:
Customer cust = Customer.findById(101); com.sybase.collections.ObjectList orders = cust.getSalesOrders(); SalesOrder order = (SalesOrder)orders.getByIndex(0); order.setOrder_date(new java.util.Date()); order.save(); cust.submitPending();