-
Looking at the documentation there is a way to modify the fields: await RedactedUser.createCollection({
viewOn: 'users', // Set `viewOn` to the collection name, **not** model name.
pipeline: [
{
$set: {
name: { $concat: [{ $substr: ['$name', 0, 3] }, '...'] },
email: { $concat: [{ $substr: ['$email', 0, 3] }, '...'] }
}
}
]
}); But is there a way to remove the "name" and "email" fields? Using Also is there a way to tie the schema for RedactedUser to an interface so that the name and email fields don't show up in autocomplete? Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
joshpetit
Oct 26, 2022
Replies: 1 comment
-
Turns out I just had to update mongodb to 4.X, :P |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joshpetit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Turns out I just had to update mongodb to 4.X, :P