Use the apply operation parameters cache policy to apply the operation's parameters to the consolidated database.
The values of the operation parameters are directly applied to the consolidated database (CDB).
Note: These terms all represent the same thing: consolidated database, CDb, and cache.
This example uses the department table, in the sampledb database:
- Drag and drop the department table onto the Mobile Application Diagram to create a mobile business object (MBO).
- In the MBO, double-click the Update operation. The Operation Properties dialog opens.
- Select the Cache Policy tab, and select Apply operation parameters for the Cache Update Policy.
- Deploy the MBO to Unwired Server.
- In Sybase Control Center, set the MBO's Cache Interval to one hour (or any value sufficiently long to complete this test).
- Synchronize the MBO from a test client or device application. The client, the CDb, and the EIS all have the same data:
dept_id dept_name dept_head_id
------- ------------------ ------------
100 R & D 501
200 Sales 902
300 Finance 1293
400 Marketing 1576
500 Shipping 703
- Call the MBO's update operation from the test client or device application to update this record:
dept_id=400, dept_name="QA", dept_head_id=1576
The EIS is modified:
dept_id dept_name dept_head_id
------- ------------------ ------------
100 R & D 501
200 Sales 902
300 Finance 1293
400 QA 1576
500 Shipping 703
- Synchronize the MBO. Based on the apply operation parameters policy, which is associated with this operation:
- The dept_id=400 record is updated using the update operation's parameter values (an inferred read), and becomes:
dept_id=400, dept_name=QA, dept_head_id=1576
-
The CDb and the client are updated, and contain:
dept_id dept_name dept_head_id
------- ------------------ ------------
100 R & D 501
200 Sales 902
300 Finance 1293
400 QA 1576
500 Shipping 703