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?
optionalenforceRefCheck:boolean|"throw"
Defined in: handler/find/find-by-id-options.ts:20
lean?
optionallean: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?
optionalpopulate:string|string[]
Defined in: handler/find/find-by-id-options.ts:6
populateMaxDeep?
optionalpopulateMaxDeep:number
Defined in: handler/find/find-by-id-options.ts:10
select?
optionalselect:string|string[]
Defined in: handler/find/find-by-id-options.ts:5
timeout?
optionaltimeout:number
Defined in: handler/find/find-by-id-options.ts:9
transactionContext?
optionaltransactionContext:TransactionAttemptContext
Defined in: handler/find/find-by-id-options.ts:4
transcoder?
optionaltranscoder:any
Defined in: handler/find/find-by-id-options.ts:8
withExpiry?
optionalwithExpiry:boolean
Defined in: handler/find/find-by-id-options.ts:7