Well. That’s it.
I have a documet with Datetime field in it. Now I need to perform atomic operation that will increase this value on some period, f.e. one day.
How to do that?
And ultimately I need to do that via morphia, if you know how to, please share.
Dates are milliseconds since the Unix epoch (MongoDB Dates).
So you can query for the document with the date you want to increment and add (inc/dec in Morphia) the number of ms you need – for example for a day.