mongoose-field-encryption icon indicating copy to clipboard operation
mongoose-field-encryption copied to clipboard

.select workaround based on field names for find and findOne

Open doguhanokumus opened this issue 4 years ago • 1 comments

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

doguhanokumus avatar Jun 17 '21 15:06 doguhanokumus

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 :)

wheresvic avatar Oct 01 '21 08:10 wheresvic