Reputation: 51383
Do I need to tack on a lastActivity: new Date()
@set
every time I interact with it or is there a better way?
Upvotes: 0
Views: 73
Reputation: 36774
MongoDB currently doesn't have built-in functionality to set the last-updated date, so you have to do that yourself indeed. I would probably (depending on language) inherit the MongoCollection class to add a thin wrapper around this to do it myself.
Upvotes: 2