doujiu7704
2014-03-19 06:26如何使用golang mgo MongoDb驱动程序获取最后插入的ObjectId
I am using the mgo MongoDB driver for Golang.
Can I get the last ObjectId
after inserting a new object?
Or should I create _id
manually with bson.NewObjectId
?
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 如何在golang mgo.v2库中使用MongoDB获得汇总管道结果
- mongodb
- 1个回答
- Golang-MongoDB(mgo)检索插入的文件(BSON不是GridFS)
- mongodb
- 1个回答
- MongoDb:如何在golang中的对象集合中插入其他对象?
- mongodb
- 2个回答
- Golang Mgo-如何查看结果?
- mongodb
- 1个回答
- GoLang MongoDB连接泄漏
- mongodb
- connection
- 1个回答
换一换