0

在我的 mongoDB 数据库中,我有名为数字的集合。例如

db.15.find()

如果您还不知道这将返回错误。如何获取文档 id 一个名为数字的集合?

4

1 回答 1

1

您可以使用getCollection()方法。

对于你的例子,你得到:

db.getCollection('15').find();

HTH - 抢。

于 2013-04-29T03:07:52.560 回答