Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createdAt timestamp overwritten during findAndModify update w/upsert #94

Closed
yangchristian opened this issue Sep 20, 2017 · 0 comments
Closed
Assignees

Comments

@yangchristian
Copy link
Member

For findAndModify with upsert, we run the update object against parseInsertObj since we might be inserting a new document. However, we may also just be doing an update, and the current implementation will always replace the createdAt and updatedAt fields, meaning createdAt gets overwritten. Will add a small fix not to overwrite createdAt.

We also have the scenario where we replace whatever updatedAt field we were passed. However, I believe we can count this situation as intended behavior. Thoughts @dimensia?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant