update Link
See updateLink_(EntityValue, Property, EntityValue, HttpHeaders?, RequestOptions?).
Parameters
from
From parameter.
property
Property parameter.
to
To parameter.
open suspend fun updateLink(from: EntityValue, property: Property, to: EntityValue, headers: HttpHeaders?)
See updateLink_(EntityValue, Property, EntityValue, HttpHeaders?, RequestOptions?).
Parameters
from
From parameter.
property
Property parameter.
to
To parameter.
headers
Headers parameter.
open suspend fun updateLink(from: EntityValue, property: Property, to: EntityValue, headers: HttpHeaders?, options: RequestOptions?)
Update a link from a source entity to a target entity.
- Example using proxy classes:
open fun updateLinkExample(): kotlin.Unit { val service = this.service; val product = service.getProduct(DataQuery().top(1)); val category = service.getCategory(DataQuery().skip(2).top(1)); service.updateLink(product, Product.category, category); }
- Example using dynamic API:
open fun updateLinkExample(): kotlin.Unit { val service = this.service; val productsEntitySet = service.getEntitySet("Products"); val categoriesEntitySet = service.getEntitySet("Categories"); val productEntityType = productsEntitySet.entityType; val categoryProperty = productEntityType.getProperty("Category"); val product = service.executeQuery(DataQuery().from(productsEntitySet).top(1)) .getRequiredEntity(); val category = service.executeQuery(DataQuery().from(categoriesEntitySet) .skip(2).top(1)) .getRequiredEntity(); service.updateLink(product, categoryProperty, category); }
Parameters
from
Source entity for the link to be updated.
property
Source navigation property for the link to be updated. This must be a one-to-one navigation property.
to
Target entity for the link to be updated.
headers
(nullable) Optional request-specific headers.
options
(nullable) Optional request-specific options.