Im just doing CRUD on a mongo database with Java. My problem is when I query the database
db.getCollection("something").find()
I get the documents correctly, but the ObjectId of each document is something like this:
"_id": {
"timestamp": **********,
"machineIdentifier": 16375804,
"processIdentifier": 3908,
"counter": 9920756,
"time": 1459641911000,
"date": "2016-04-03T00:05:11.000+0000",
"timeSecond": **********
}
I need to get the 12-byte ObjectId, like this:
ObjectId("507f1f77bcf86cd799439011")
How do I do that?