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

JQuery Autocomplete without using label, value, id -

jquery - Making vertical list scroll on mouse over -

c++ - Accessing inactive union member and undefined behavior? -