Skip to main content
Version: Next

InitCollectionOptions <T, P, F, E>

Options for initializing a collection via init() or load().

Hierarchy

Index

Properties

optionalinheritedconnectionType

connectionType?: ConnectionType

Connection type (read or write replica).

optionalinheritedconvertCustomTypes

convertCustomTypes?: boolean

Whether to convert custom types during hydration.

optionaldataloader

dataloader?: boolean

Whether to use the dataloader for batching collection loads.

optionalinheritedexclude

exclude?: readonly AutoPath<T, E, never, 9>[]

Fields to exclude from loading.

optionalinheritedfields

fields?: readonly AutoPath<T, F, *, 9>[]

Select specific fields to load (partial loading).

optionalinheritedfilters

filters?: FilterOptions

Filter options to apply when loading relations.

optionalinheritedignoreLazyScalarProperties

ignoreLazyScalarProperties?: boolean

Whether to skip loading lazy scalar properties.

optionalinheritedlockMode

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).

optionalinheritedlogging

logging?: LoggingOptions

Logging options for the query.

optionalinheritedlookup

lookup?: boolean

Whether to look up eager-loaded relationships automatically.

optionalinheritedorderBy

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

Ordering for populated relations.

optionalpopulate

populate?: Populate<T, P>

Relations to populate on the loaded items.

optionalinheritedpopulateWhere

populateWhere?: PopulateHint | infer | all

Controls how where conditions are applied to populated relations.

optionalref

ref?: boolean

Populate only references (without loading full entities). Works only with M:N collections that use pivot table.

optionalinheritedrefresh

refresh?: boolean

Whether to reload already loaded entities.

optionalinheritedschema

schema?: string

Database schema override.

optionalinheritedstrategy

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

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

optionalinheritedvalidate

validate?: boolean

Whether to validate the populate hint against the entity metadata.

optionalinheritedwhere

where?: FilterQuery<T>

Additional filtering conditions applied to populated relations.