Readonly$fieldsMap of the fields that exist on the model.
ReadonlybootedWhether the model has been booted.
Optional ReadonlycollectionName of the collection to use.
Optional ReadonlyconnectionCustom database connection to use.
Managing computed columns
Add a field on the model.
This is usually done by the @field decorator.
Optionaloptions: Partial<FieldOptions>Returns the field options if it exists.
Fetch all documents in the collection.
Optionaloptions: ModelAdapterOptions<FindOptions<ModelAttributes<InstanceType<ModelType>>>>Count the number of documents in the collection that match the filter.
Optionaloptions: ModelAdapterOptions<CountDocumentsOptions>Create a new document in the collection.
Optionaloptions: ModelAdapterOptions<InsertOneOptions>Create many documents in the collection.
Optionaloptions: ModelAdapterOptions<BulkWriteOptions>Find a document by its id.
Optionaloptions: ModelAdapterOptions<FindOptions<ModelAttributes<InstanceType<ModelType>>>>Find a document using a key-value pair.
Optionaloptions: ModelAdapterOptions<FindOptions<ModelAttributes<InstanceType<ModelType>>>>Find a document using a key-value pair. Throw if no document is found.
Optionaloptions: ModelAdapterOptions<FindOptions<ModelAttributes<InstanceType<ModelType>>>>Find many documents by their ids.
Optionaloptions: ModelAdapterOptions<FindOptions<ModelAttributes<InstanceType<ModelType>>>>Find a document by its id. Throw if no document is found.
Optionaloptions: ModelAdapterOptions<FindOptions<ModelAttributes<InstanceType<ModelType>>>>Get the collection object from the MongoDB driver.
Optionalconnection: stringReturns a query
Optionalfilter: Filter<ModelAttributes<InstanceType<ModelType>>>Optionaloptions: ModelAdapterOptions<
Shape of the model static properties.