Is it possible to override "_id" field in MongoDB, when I'm using Django and Mongoengine?
<p>I don't want to create a custom "id" field in MongoDB and make it my primary key.</p>

<p>But I want to override the "_id" field and make it an integer primary key so that every time I post a new document, it should have a integer id rather than ObectID.</p>

<p>Can it be possible by overriding some code in MongoEngine(PyMongo)? or this is the core functionality of MongoDB?</p>

<p>I've tried to insert documents directly in MongoDB database(without using Django), specifying the integer "_id" and it saves the document with no problem. However, when I try to query that particular document then it gives no result.</p>

<p>Same happens with Django, when I hit the API endpoint to see the list of documents it shows the one which has integer id.</p>

<p>But when I try to access that particular one, it says "no result found"</p>

<p>How can I deal with this, please advise.</p>

<p>Note: I'm new to both Django and MongoDB.</p>