Clone Documents克隆文档

Important

Cloning documents is not permitted in MongoDB Compass Readonly Edition.MongoDB Compass只读版中不允许克隆文档。

You can insert new documents by cloning the schema and values of an existing document in a collection.可以通过克隆集合中现有文档的架构和值来插入新文档。

Select the appropriate tab based on whether you are viewing your documents in List, JSON, or Table view:根据您是在列表、JSON还是在表视图中查看文档,选择适当的选项卡:

To clone a document, hover over the desired document and click the Clone button.要克隆文档,请将鼠标悬停在所需文档上,然后单击“克隆”按钮。

Clone button
click to enlarge
Note

JSON View is available starting in Compass 1.20.JSON视图从Compass 1.20开始提供。

To clone a document, hover over the desired document and click the Clone button.要克隆文档,请将鼠标悬停在所需文档上,然后单击“克隆”按钮。

Clone button JSON
click to enlarge

To clone a document, hover over the desired document and click the Clone button.要克隆文档,请将鼠标悬停在所需文档上,然后单击“克隆”按钮。

Clone button Table view
click to enlarge

When you click the Clone button, Compass opens the document insertion dialog with the same schema and values as the cloned document. 单击“克隆”按钮时,Compass将打开与克隆文档具有相同架构和值的文档插入对话框。You can edit any of these fields and values before you insert the new document. 在插入新文档之前,可以编辑这些字段和值中的任何一个。To learn more about inserting documents, see Insert Documents.要了解有关插入文档的详细信息,请参阅插入文档

Clone view