Class OneToOneLink<EntityT, DeSerializersT, LinkedEntityApiT>

Represents a link from one entity to one other linked entity (as opposed to a list of linked entities). In OData v2 a OneToOneLink can be used to filter and order a selection on an entity based on filters and orders on a linked entity.

Type Param: LinkedEntityT

Type of the entity to be linked to.

Type Parameters

Hierarchy (view full)

Constructors

Properties

_deSerializers: DeSerializersT

Dummy property to also include the deserializer type in the structure of the entity type.

_entity: EntityT

Dummy property whose type makes structurally identical entities distinguishable in TypeScript.

_fieldName: string
_linkedEntityApi: LinkedEntityApiT

List of selectables on the linked entity.

Filterables to apply to the given entity based on the linked entity.

List of criteria of the linked entity to order the given entity by with descending priority.

Methods

  • Create a new link based on a given link.

    Returns this

    Newly created link.

  • Create order statements for the OData request based on the linked entity. The given statements have descending priority.

    Parameters

    Returns OrderLink<EntityT, LinkedEntityApiT>

    Newly created order link.

    Example

    Entity.requestBuilder()
    .getAll()
    .orderBy(Entity.TO_LINKED_ENTITY.orderBy(asc(LinkedEntity.PROPERTY1), desc(LinkedEntity.PROPERTY2)));