node-mongo-tenant icon indicating copy to clipboard operation
node-mongo-tenant copied to clipboard

Add immutable option to make the tenantId field immutable

Open IvoFritsch opened this issue 5 years ago • 1 comments

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

IvoFritsch avatar May 18 '20 13:05 IvoFritsch

I like this.

For further reference: https://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-immutable

alrik avatar Sep 18 '20 08:09 alrik