node-mongo-tenant
node-mongo-tenant copied to clipboard
Add immutable option to make the tenantId field immutable
Mongoose has the property immutable for a field. It would be cool to add this option in the plugin.
for example: SomeSchema.plugin(mongoTenant, { ... , immutable: true });
Thanks in advance
I like this.
For further reference: https://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-immutable