I have a collection of items that have a field called views that's updated every time someone clicks on the item. I realized that when this was being modified, the updatedAt was being updated as well. I've added an option called ignoreFields which takes an array of field names. Updates to these fields will not result in updating updatedAt.
BTW I realize one can just use the regular Meteor way of updating a collection to avoid the timestamp beforeUpdate event from triggering. :) I wanted to add this as just an extra nice option to have handy.
Use case:
I have a collection of items that have a field called
views
that's updated every time someone clicks on the item. I realized that when this was being modified, theupdatedAt
was being updated as well. I've added an option calledignoreFields
which takes an array of field names. Updates to these fields will not result in updatingupdatedAt
.