Difference between revisions of "MongoDB ObjectIds"
From mi-linux
Jump to navigationJump to search (Created page with "MongoDB Workbook") |
|||
Line 1: | Line 1: | ||
− | [[MongoDB_Workbook|MongoDB Workbook]] | + | [[Main Page]] >> [[MongoDB|MongoDB]] >>[[MongoDB_Workbook|MongoDB Workbook]] >> Object IDs |
+ | |||
+ | == Object IDs == | ||
+ | |||
+ | You may have noticed that the database creates an unique object for each document: | ||
+ | |||
+ | db.deptCollection.find().pretty() | ||
+ | |||
+ | Examine the output carefully and you will notice for each department in the collection something like: | ||
+ | |||
+ | <pre style="color:blue"> | ||
+ | "_id" : ObjectId("5808e3d2ec0ff55100af2649") | ||
+ | </pre> |
Revision as of 13:18, 21 October 2016
Main Page >> MongoDB >>MongoDB Workbook >> Object IDs
Object IDs
You may have noticed that the database creates an unique object for each document:
db.deptCollection.find().pretty()
Examine the output carefully and you will notice for each department in the collection something like:
"_id" : ObjectId("5808e3d2ec0ff55100af2649")