GetEntityOrThrowOptions

GetEntityOrThrowOptions

Options used by the TransactionalConnection getEntityOrThrow method.

Signature

interface GetEntityOrThrowOptions<T = any> extends FindOneOptions<T> {
  channelId?: ID;
  retries?: number;
  retryDelay?: number;
}

Extends

  • FindOneOptions<T>

Members

channelId

property
type:
ID
An optional channelId to limit results to entities assigned to the given Channel. Should only be used when getting entities that implement the ChannelAware interface.

retries

property
v1.1.0
type:
number
default:
0
If set to a positive integer, it will retry getting the entity in case it is initially not found. This can be useful when working with the EventBus and subscribing to the creation of new Entities which may on first attempt be inaccessible due to an ongoing transaction.

retryDelay

property
v1.1.0
type:
number
default:
25
Specifies the delay in ms to wait between retries.