mars
mars copied to clipboard
$out(聚合)不支持插入到外部数据库中
在指定out属性时,使用Out.to("")生成Out对象,不能指定数据库 db.getSiblingDB("test").books.aggregate( [ { $group : { _id : "$author", books: { $push: "$title" } } }, { $out : { db: "reporting", coll: "authors" } } ] )