The sap.ui.model.odata.v4.ODataModel
is the model implementation for consuming an OData V4 service.
Note:
The interface for applications has been changed for an easier and more efficient use of the model. For a summary of these changes, see Changes Compared to OData V2 Model.
The OData V4 model supports the following:
Read access
Updating properties of OData entities (in entity sets and contained entities) via two-way-binding
Deleting entities
Operation (function and action) invocation
Grouping data requests in a batch request
Server-side sorting and filtering
Note:
The OData V4 model documentation contains several code samples. These refer to the Sales Orders sample in the Demo Kit.
[Transition to OData V4.01](transition-to-odata-v4-01-cda632b.md “”)
ActionImport
, FunctionImport
, bound Actions
and bound Functions
). Unbound parameters are limited to primitive values.getMetaModel
to a corresponding metadata model sap.ui.model.odata.v4.ODataMetaModel
, which is read-only and offers access to OData V4 metadata in a streamlined JSON format (see links under Related Information for more details). Only one-time bindings are supported by this model because the metadata is immutable.sap.ui.model.odata.v4.ODataListBinding#create
method creates a new entity inside a collection. Users can interact with a newly created entity even before it has been sent to the server.null
value, you can create a new entity via a so-called “upsert” (an update that does an insert ). Usually, no API is needed for this as two-way property bindings are sufficient.v4.Context.delete
method deletes an entity on the server and updates the user interface accordingly.sap.ui.model.odata.type.Currency
and sap.ui.model.odata.type.Unit
enable you to use code lists with customizing for currency codes and units.Related Information
Changes Compared to OData V2 Model