Class OneToManyLink<EntityT, DeSerializersT, LinkedEntityApiT>

Represents a one to many relation for OData v4 entities. For OData v2 entities the Link is used to represent one to many relation. See Link for more information.

Type Parameters

Hierarchy

  • Link<EntityT, DeSerializersT, LinkedEntityApiT>
    • OneToManyLink

Constructors

  • Creates an instance of Link.

    Type Parameters

    • EntityT extends EntityBase<EntityT>

    • DeSerializersT extends DeSerializers<any, any, any, any, any, any, any, any, any, any, any, any, any, any, DeSerializersT>

    • LinkedEntityApiT extends EntityApi<EntityBase, DeSerializersT, LinkedEntityApiT>

    Parameters

    • _fieldName: string

      Name of the linking field to be used in the OData request.

    • _entityApi: EntityApi<EntityT, DeSerializersT>

      Entity API for building and executing the request.

    • _linkedEntityApi: LinkedEntityApiT

      Constructor of the linked entity.

    Returns OneToManyLink<EntityT, DeSerializersT, LinkedEntityApiT>

Properties

_deSerializers: DeSerializersT

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

_entity: EntityT

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

_entityApi: EntityApi<EntityT, DeSerializersT>
_expand: Expandable<EntityType<LinkedEntityApiT>, DeSerializersT, EntityApi<EntityBase, DeSerializersT>>[]
_fieldName: string
_filters: FilterLink<EntityT, DeSerializersT, LinkedEntityApiT>
_linkedEntityApi: LinkedEntityApiT
_selects: Selectable<EntityType<LinkedEntityApiT>, DeSerializersT>[]

List of selectables on the linked entity.

_skip: number
_top: number

Methods

  • Create a new link based on a given link.

    Returns

    Newly created link.

    Returns OneToManyLink<EntityT, DeSerializersT, LinkedEntityApiT>

  • Skip number of entities.

    Returns

    The request builder itself, to facilitate method chaining.

    Parameters

    • skip: number

      Number of matching entities to skip. Useful for paging.

    Returns OneToManyLink<EntityT, DeSerializersT, LinkedEntityApiT>

  • Number of returned entities.

    Returns

    The request builder itself, to facilitate method chaining.

    Parameters

    • top: number

      Maximum number of entities to return in the response. Can be less, if less entities match the request.

    Returns OneToManyLink<EntityT, DeSerializersT, LinkedEntityApiT>

Copyright Ⓒ 2023 SAP SE or an SAP affiliate company. All rights reserved.