Closed intermx-reddysai closed 2 years ago
@vinerich any ideas?
I have three patch records with the same reference Id, to get the first and/or second patch version, it is not working with the rollback.
@codepunkt shouldn't be something with the newest version. (I hope)
@intermx-reddysai can you show us the three patch records and the document you try to rollback? Edit: Plugin config would be nice too! Which options are you using?
Thanks!
Hey @intermx-reddysai any news on this? Did you fix your error? Let us know!
That was because of ObjectId, it is not working properly on ObjectId.
I had a model field with array of mongoose object Ids. If I update any of the object id, it is not working as expected.
Thanks for your response! Could you share a few more details with us so we can look into it?
push/pop
operations or with save
?Thanks!
NodeJS: 12.16.3 npm: 6.14.4 OS: ubuntu
I'm trying to read the initial patch record with help of rollback but it is throwing an error like,
doc = await doc.rollback(patches[0]._id.toString(), {}, false);
How do I read read the initial (operation: { op: 'add', ...) record?