mongoose-encryption
mongoose-encryption copied to clipboard
decryptPostSave: true does not work if field is immutable
A schema with field options immutable: true
will return the field as undefined
on save even if decryptPostSave: true
.
The field is decrypted on find
however.
Thanks for reporting this. Sounds like a bug!
Don't currently have any tests for the use of immutable
- would be great to add them.
I don't have much time to work on this plugin these days, but am very happy to review any tested PRs :)