Class: FindByIdOptions
Constructors
constructor
• new FindByIdOptions(data
)
Parameters
Name | Type |
---|---|
data | FindByIdOptions |
Defined in
handler/find/find-by-id-options.ts:21
Properties
enforceRefCheck
• Optional
enforceRefCheck: boolean
| "throw"
Defined in
handler/find/find-by-id-options.ts:20
lean
• Optional
lean: boolean
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
Defined in
handler/find/find-by-id-options.ts:19
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