'When receiving a document without an id field

https://www.mongodb.com/docs/manual/core/document/

The _id Field section describes as follows.

If the server receives a document that does not have the _id field first, then the server will move the field to the beginning.

If there is no id field, said to move to the beginning.

So, is it correct to operate as follows?

If you receive a document without an id field, create an id and set it as the beginning.

I'm confused. Please help me. 😥



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source