Closed sukruavcuoglu closed 1 year ago
@sukruavcuoglu From mongoose docs (https://mongoosejs.com/docs/api/model.html#Model.create()) create is a shortcut to make the document and save it so it makes sense that the fields are then encrypted.
As you have already figured it out, you can use decryptSync
to then get the original values back.
Thanks for the response.
Hi,
Thanks for providing this great library.
I have a problem with create operation. Objects returned from "create" operation has encrypted fields.
I have an example like below:
Returned user is like this:
Is there any future plan to change the behaviour?
For now, as a workaround, I am using "decryptFieldsSync" function on the object before returning.
Thanks.