createEntity

open override fun createEntity(entity: EntityValue, headers: HttpHeaders, options: RequestOptions)

Create an entity in the target system. Automatically calls {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlDocument#resolveEntity(com.sap.cloud.mobile.kotlin.odata.EntityValue) CsdlDocument.resolveEntity} to ensure that {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#entitySet EntityValue.entitySet} is available.

Throws:

{@link com.sap.cloud.mobile.kotlin.odata.DataServiceException} if the entity set hasn't been explicitly provided before calling createEntity and there isn't a unique entity set for the entity type.

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.EntityValue#ofType(com.sap.cloud.mobile.kotlin.odata.EntityType, com.sap.cloud.mobile.kotlin.odata.core.SparseIndexMap?) EntityValue.ofType}, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#inSet(com.sap.cloud.mobile.kotlin.odata.EntitySet) EntityValue.inSet}.

Parameters

entity

Entity to be created.

headers

Request-specific headers.

options

Request-specific options.