This repository was archived by the owner on Dec 9, 2022. It is now read-only.
Releases: goto-bus-stop/mongoose-model-decorators
Releases · goto-bus-stop/mongoose-model-decorators
Release list
v0.4.0
Added a hook to configure the schema with a function (c18833a), to do things that don't have a syntax in this module, such as compound indices or custom queries.
@Model
class User {
static schema = { /* ... */ }
static configureSchema (schema) {
schema.index({ name: 1, source: 1, medium: 1 }, { unique: true })
}
}v0.3.2
v0.3.1
v0.3.0
Features
- Attach a Model to a non-default connection using the
@Model({ connection: ... })option (#4)