Replies: 1 comment
-
@eliw00d without more information on what "I have an array of objects type and when that gets set, the result of this update is an empty array, even though a new array was provided." means in terms of code and observed+expected behavior, it would be hard to provide any meaningful advice. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following pre findOneAndUpdate hook:
And the schema has a toObject.transform function that handles schema versioning.
What I am trying to do is overwrite the document to get rid of some fields when old fields are no longer required. I have an array of objects type and when that gets set, the result of this update is an empty array, even though a new array was provided.
Is there a way to get this to work with overwrite?
Beta Was this translation helpful? Give feedback.
All reactions