mongokit icon indicating copy to clipboard operation
mongokit copied to clipboard

Function to determine differences between Object's current and persistant state eg. obj.dirty()

Open mattbodman opened this issue 12 years ago • 2 comments

Returns a list of fields (and values) that differ from the object's current and persistant states. One could create a type of version or modification history. Apologies in advance if there is already a method to do this in mongokit (I haven't found one and will build my own)

mattbodman avatar Dec 10 '12 02:12 mattbodman

+1

AstraLuma avatar Sep 13 '13 18:09 AstraLuma

There isn't a public method to do it. However, there is a (very) old (and unofficial) implementation of versioned document here: https://github.com/namlook/mongokit/blob/master/mongokit/versioned_document.py

You can check it out.

If you want the obj.dirty() method, you are very welcome to submit a pull request (with tests and documentation) :)

namlook avatar Sep 17 '13 08:09 namlook