Do I need to tack on a lastActivity: new Date() @set every time I interact with it or is there a better way?
Do I need to tack on a lastActivity: new Date() @set every time I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.