DDCODE

Share programming skills from Magic Oriental

upArrow

Is the id of the non-primary key in mongodb string or objectid

 May 12, 2019   mongodb, question
{
 _id:ObjectId,
 otherID:String
 }
{
 _id:ObjectId,
 OtherID:ObjectId
 }

What’s the difference?

Please use ObjectId, various operations are more convenient than strings.

Related Posts:

  • Mongo Non-Primary Key objectid Can Be Empty
  • After MySQL ORDER BY primary key id and LIMIT limit…
  • When mysql data tables are many-to-many…
  • Primary key has been increased by itself, 1062…
  • If a primary key has auto_increment, why should…
  • After mysql deletes a part of the id, how can the…
  • Regarding the modeling of mongodb, some people…
  • When you use MongoDB as your database, do you use…
  • A little bit confused about the principle of mysql…
<< Questions about MongoDB Usage Scenarios Is there any function in MongoDB to find documents in batches and then update the specified field values of documents? >>

Related Posts:

  • Mongo Non-Primary Key objectid Can Be Empty
  • After MySQL ORDER BY primary key id and LIMIT limit…
  • When mysql data tables are many-to-many…
  • Primary key has been increased by itself, 1062…
  • If a primary key has auto_increment, why should…
  • After mysql deletes a part of the id, how can the…
  • Regarding the modeling of mongodb, some people…
  • When you use MongoDB as your database, do you use…
  • A little bit confused about the principle of mysql…

Tags

Android android-studio apache c c++ centos Css css3 Database Docker Eclipse Express Front end git GitHub golang Html html5 Ios java javascript Jquery Laravel linux macos mongodb mysql Nginx node.js npm objective-c php Programmer python redis ruby shell Spring Sql Swift ubuntu vim vue.js Web xcode

Powered by MyWiki WordPress Theme