These are chat archives for Automattic/mongoose

16th
Aug 2017
Jayaram Kannan
@Kannaj
Aug 16 2017 08:25
Hi Guys , looking for help with regards to implementing a version control method for documents.
I have this sorta complex object
{
  "type": "a",
  "obj": {
    "a": 1,
    "b": {
      "c": 1
    },
    "d": {
      "p1": "a",
      "p2": "b",
      "p3": "c"
    }
  }
}
the ds under the 'obj' key is highly non standard - some of them wouldnt have any keys inside while some would have highly diffferent keys
hope that made sense .. essentially - have a v1 , v2 ,v3 parts of the document
Jayaram Kannan
@Kannaj
Aug 16 2017 08:31
anyways .. does mongoose have any way i can preserve old "obj" variations in case someone updates any keys in the "obj" key?