您的位置:首页 > 编程语言 > Go语言

Mongo 保留字段的Collection的操作

2016-04-08 14:23 218 查看
在Collection中定义了group表,

在shell中对group操作是出现错误:

> db.group.find()

2016-04-08T14:13:51.048+0800 E QUERY TypeError: Object function ( parmsObj ){

var ret = this.runCommand( { "group" : this._groupFixParms( parmsObj ) } );

if ( ! ret.ok ){

throw Error( "group command failed: " + tojson( ret ) );

}

return ret.retval;

} has no method 'find'

at (shell):1:10

解决方法:

db.getCollection("group").find()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: