mongoose-field-encryption
mongoose-field-encryption copied to clipboard
.select workaround based on field names for find and findOne
Upon our needs for our business, I've made a workaround on .select with a pre-hook. This hook automatically adds __enc_key and __enc_key_d for relevant fieldsToEncrypt.
Note: only works on top-level fields at the moment.
Doguhan
Hi @doguhanokumus
Really sorry for the delay here - it seems that I am missing github notifications for this project.
Anyways, I am not sure I quite understand the changes here. Could you explain to me what you are trying to achieve?
Also, we would need a few tests for this feature to be merged in :)