I need a help in storing and retrieving to mongodb from python using mongoengine. I am relatievely new to mongoengine and i am trying to insert a document using something like below:
Sample code i used for saving:
session = Session()
session = session.from_json(sessionjson)
session.save()
It is saving well and good, but is it possible to retrieve _id from the saved document? The above save is returning QuerySetManager object but it is not identifying a field called _id. Please advice on this