Recently, I am working on a node project, using mongoDB in the background.
Found that there is a default primary key _id in MongoDB. I can also set a sequence like mysql.
If the default primary key is used, the returned JSON string uses _id, which is not very friendly to the front end.
The question is, do I need to use a custom primary key and what are my considerations?
Generally, you don’t need to define your own primary key unless you have special requirements.