One - One Code All

Blog Content

Mongodb中插入数据后自动返回自增ID

Nosql   2016-08-02 22:47:29

MySql正常要先查询添加后的对象,再取出主键属性,Mongodb并不需要,插入数据成功后自动返回属性,直接Bean.id,即可获取主键Id




上一篇:Redis内存满了的几种解决方法
下一篇:MongoDB中ObjectId生成规则参考

The minute you think of giving up, think of the reason why you held on so long.