开发者

mongodb, copy all documents to collection

collection_A is mapReduced result.

If I want to save { '11-8-12' : collection_A} in collection_B.

How can I save one 开发者_如何转开发collection to another collection, as one of elements?


I don't think you can directly do that.

You have to manually build the document and save it to the database.

You can write this in JS and execute it with db.eval(...) so that data won't be transferred to the client, but this will convert integers to floats (the same problem you have with the mongodb shell).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜