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

Fixed conflict for createdAt and __v when doing update or findOneAnd… #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abhijitborade
Copy link

@abhijitborade abhijitborade commented Oct 24, 2018

This is patch for Issue #46.
MongoError: Updating the path 'createdAt' would create a conflict at 'createdAt'

@stefanwalther
Copy link

Any plans to merge this?

Copy link
Author

@abhijitborade abhijitborade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drudge Please review and merge this pull request.

@surfer77
Copy link

When can this be merged ? getting the same error.

@abhijitborade
Copy link
Author

abhijitborade commented Jul 2, 2019

I don't think @drudge is active. So I have published this fork separately as mongoose-timestamp2.

@developdeez
Copy link

@abhijitborade simply replacing mongoose-timestamp with mongoose-timestamp2, still had the error for me. Maybe I missed something?

@abhijitborade
Copy link
Author

@abhijitborade simply replacing mongoose-timestamp with mongoose-timestamp2, still had the error for me. Maybe I missed something?

@developdeez, can you share your query?

@developdeez
Copy link

developdeez commented Feb 25, 2020

@abhijitborade simply replacing mongoose-timestamp with mongoose-timestamp2, still had the error for me. Maybe I missed something?

@developdeez, can you share your query?

 await User.findByIdAndUpdate(id, {
                $set: myUser
              });

@abhijitborade
Copy link
Author

abhijitborade commented Feb 25, 2020

@developdeez I got it fixed. Check this issue in mongoose-timestamp2.

@developdeez
Copy link

@abhijitborade awesome. I'll check it out asap. thanks :)

@dmackinn
Copy link

dmackinn commented Aug 4, 2021

@drudge Any chance this could get merged into the main package? Are you still maintaining this? A good number of people are still downloading and using this package.

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

Successfully merging this pull request may close these issues.

6 participants