Object queries are SQL statements associated with a mobile business object (MBO), against the persistent store on the device that returns a subset of a result set. For example, an object query is used to filter data already downloaded from the CDB to display a single row of a table when triggered.
Define object queries to return a subset of MBO results, either from an MBO deployed to SAP Mobile Server or a local business object.
MBO type | Usage |
---|---|
Local business object | The requested data must be available on the mobile device. If not, MBO operations must be called to insert the requested data. The query can then continue to return data from the client's local database. |
Bound to a datasource |
|
Contained in a cache group that uses an Online policy | MBOs that use an Online cache group policy generate a single read-only object query named findByParameter, which is automatically generated by SAP Mobile WorkSpace. findByParameter query parameter(s) are generated for every load argument that has a Propagate to attribute. The findByPrimaryKey object query and any other user defined object queries are removed for MBOs that use an Online cache policy. By default, the return type is Return multiple objects and Create an index is false, and these are the only values you can modify. If you modify a Propagate To attribute of a load argument belonging to an MBO using an Online cache group policy, the object query is automatically updated. |
See Improve Object Query Performance in Mobile Data Models: Using Mobile Business Objects for information about optimizing object query performance in Native Object API applications.