mongoose-timestamp icon indicating copy to clipboard operation
mongoose-timestamp copied to clipboard

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

Open abhijitborade opened this issue 7 years ago • 9 comments

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

abhijitborade avatar Oct 24 '18 06:10 abhijitborade

Any plans to merge this?

stefanwalther avatar Dec 19 '18 00:12 stefanwalther

When can this be merged ? getting the same error.

surfer77 avatar Jun 12 '19 18:06 surfer77

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

abhijitborade avatar Jul 02 '19 15:07 abhijitborade

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

developdeez avatar Feb 25 '20 07:02 developdeez

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

@developdeez, can you share your query?

abhijitborade avatar Feb 25 '20 07:02 abhijitborade

@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
              });

developdeez avatar Feb 25 '20 07:02 developdeez

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

abhijitborade avatar Feb 25 '20 08:02 abhijitborade

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

developdeez avatar Feb 25 '20 08:02 developdeez

@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.

dmackinn avatar Aug 04 '21 19:08 dmackinn