mimani / mongoose-diff-history

Manage Mongo Collection diff History and versions
Apache License 2.0
55 stars 67 forks source link

Positional Array Updaters Not Supported ($, $[]) #70

Open bakedziti88 opened 3 years ago

bakedziti88 commented 3 years ago

When picking out fields for the original object vs updated object, two issues arise when a '$' or '$[]' is present in the update query:

  1. The pick function from lodash doesn't support picking with those updaters, so the original object (dbObject) doesn't find the field leaving the object missing that field.
  2. The updated object (updatedObject) assumes that the key name is '$', and you cannot use '$' as a field name for the log object.
denes16 commented 1 year ago

Same for me.