Skip to main content
Version: Next

EntityLoaderOptions <Entity, Fields, Excludes>

Options for controlling how relations are loaded by the EntityLoader.

Hierarchy

Index

Properties

optionalconnectionType

connectionType?: ConnectionType

Connection type (read or write replica).

optionalconvertCustomTypes

convertCustomTypes?: boolean

Whether to convert custom types during hydration.

optionalexclude

exclude?: readonly AutoPath<Entity, Excludes, never, 9>[]

Fields to exclude from loading.

optionalfields

fields?: readonly AutoPath<Entity, Fields, *, 9>[]

Select specific fields to load (partial loading).

optionalfilters

filters?: FilterOptions

Filter options to apply when loading relations.

optionalignoreLazyScalarProperties

ignoreLazyScalarProperties?: boolean

Whether to skip loading lazy scalar properties.

optionallockMode

lockMode?: NONE | PESSIMISTIC_READ | PESSIMISTIC_WRITE | PESSIMISTIC_PARTIAL_WRITE | PESSIMISTIC_WRITE_OR_FAIL | PESSIMISTIC_PARTIAL_READ | PESSIMISTIC_READ_OR_FAIL

Lock mode for the query (pessimistic locking).

optionallogging

logging?: LoggingOptions

Logging options for the query.

optionallookup

lookup?: boolean

Whether to look up eager-loaded relationships automatically.

optionalorderBy

orderBy?: QueryOrderMap<Entity> | QueryOrderMap<Entity>[]

Ordering for populated relations.

optionalpopulateWhere

populateWhere?: PopulateHint | infer | all

Controls how where conditions are applied to populated relations.

optionalrefresh

refresh?: boolean

Whether to reload already loaded entities.

optionalschema

schema?: string

Database schema override.

optionalstrategy

strategy?: LoadStrategy | select-in | joined | balanced

Loading strategy to use (select-in, joined, or balanced).

optionalvalidate

validate?: boolean

Whether to validate the populate hint against the entity metadata.

optionalwhere

where?: FilterQuery<Entity>

Additional filtering conditions applied to populated relations.