mongodb - last update in mongoengine -


is there way find last update document in collection? in other way sort collection update

somethings this

people = person.objects.order_by_update() 

or must add update time each doc?

i use mongodb, mongoengine, flask

you must add field such last_updated_time if want able sort in way. also, since you're sorting on it, should index it.

the thing mongodb stores default _id, can used created_time timestamp.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -