Open michaeljota opened 8 years ago
Well, in the mean time, after loading the document(s). just delete the property to be exclude.
delete user.hashedPassword;
delete user.salt;
I'll try to find a way to do inside the BaseDocument, but trully not sure how to use it.
Hi Michael,
Yup, BaseDocument
is the place to go for this, although changes to Document
may be required as well. I'll look in to it.
Thanks!
Right now you can use populate to get just the fields you want, but, can you just exclude fields?
I mean something like this:
or
or maybe
The expect behavior it's to exclude those fields in the loaded person. Of course right now you can just populate all the fields that you want, but if you add something else, you have to add it in populate too.
It's not a breaking feature, but it's a nice one to have I think.
Also, I see some issues about this. What if some one makes a request as:
Well, if you want to populate 'address' only, the '-spouse' will be exclude by default, that's the actual behavior.