Skip to main content

Class: FindByIdOptions

Defined in: handler/find/find-by-id-options.ts:3

Constructors​

Constructor​

new FindByIdOptions(data): FindByIdOptions

Defined in: handler/find/find-by-id-options.ts:21

Parameters​

data​

FindByIdOptions

Returns​

FindByIdOptions

Properties​

enforceRefCheck?​

optional enforceRefCheck: boolean | "throw"

Defined in: handler/find/find-by-id-options.ts:20


lean?​

optional lean: boolean

Defined in: handler/find/find-by-id-options.ts:19

Documents returned from queries with the lean option enabled are plain javascript objects, not Ottoman Documents. They have no save methods, hooks or other Ottoman Document's features.

Example​

const document = await UserModel.findById(id, { lean: true });
document instanceof Document; // false

populate?​

optional populate: string | string[]

Defined in: handler/find/find-by-id-options.ts:6


populateMaxDeep?​

optional populateMaxDeep: number

Defined in: handler/find/find-by-id-options.ts:10


select?​

optional select: string | string[]

Defined in: handler/find/find-by-id-options.ts:5


timeout?​

optional timeout: number

Defined in: handler/find/find-by-id-options.ts:9


transactionContext?​

optional transactionContext: TransactionAttemptContext

Defined in: handler/find/find-by-id-options.ts:4


transcoder?​

optional transcoder: any

Defined in: handler/find/find-by-id-options.ts:8


withExpiry?​

optional withExpiry: boolean

Defined in: handler/find/find-by-id-options.ts:7