Skip to main content

GetEntityOrThrowOptions

GetEntityOrThrowOptions

Options used by the TransactionalConnection getEntityOrThrow method.

Signature
interface GetEntityOrThrowOptions<T = any> extends FindOneOptions<T> {
channelId?: ID;
retries?: number;
retryDelay?: number;
includeSoftDeleted?: boolean;
}
  • Extends: FindOneOptions<T>

channelId

property

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
number
default:
0

If set to a positive integer, it will retry getting the entity in case it is initially not found.

retryDelay

property
v1.1.0
number
default:
25

Specifies the delay in ms to wait between retries.

includeSoftDeleted

property
v1.3.0
boolean
default:
false

If set to true, soft-deleted entities will be returned. Otherwise they will throw as if they did not exist.