Creating a Relationship Between Mobile Business Objects

Create a relationship between mobile business objects to associate related data and maintain data synchronization on the application device.

Prerequisites
Creating Database Mobile Business Objects
Task
Create a relationship between the Customer and Sales_order MBOs.
  1. Create a link between the two MBOs:
    1. In the Palette, select Relationship.
      When you hover over any part of the Mobile Application Diagram, the cursor changes to a relationship arrow.
      palette_new_relationship
    2. In the Mobile Application Diagram, drag the mouse from any part of the Customer MBO to any part of the Sales_order MBO to draw a relationship link.
  2. In the New Relationship wizard, define the relationship between the MBOs:
    1. In the General section, the default settings are for a bi-directional one-to-many relationship between the Customer MBO (the Source Object) and the Sales_order MBO (the Target Object). Accept these default settings and select Composite to further define the data flow for the relationship.
    2. In the Mappings section, drag the mouse to draw a line from the id attribute in the Source Mobile Business Object to the cust_id attribute in the Target Mobile Business Object.
      Alternatively, click the small, yellow box to the right of the id attribute in the Source Mobile Business Object, and then click the small, yellow box to the left of the cust_id attribute in the Target Mobile Business Object to draw the line.

    id_to_custid_mapping
  3. Click Finish to close the New Relationship wizard.
    In the Mobile Application Diagram, a line connects the Customer and Sales_order MBOs to show they are related objects. Different types of arrows show different relationship types, in this case, one-to-many and bidirectional relationships. You can click the objects and select the Attributes tab to see the Attributes in the Properties view.
    mbo_customer_sales_order1
  4. Select File > Save.