English 中文(简体)
文档中的 Mongoose Mongo 额外字段
原标题:Mongoose Mongo extra fields in document

所以,我正在使用 MOngoose ODM 。 我有一个收藏, 文件中基本上有一个字段。 我稍后也许会添加更多。 因此, 当我插入时, 它插入精细, 数据也存在, 还有很多其他的字段, 比如: New, 错误, 活动平板, 状态等等... 看起来像 Mongoose 对象数据, 不知道为什么它会进入它。 有什么想法吗?

问题回答

这些数据确实是Mongoose为其正确操作插入的数据。 例如,这些数据用于:验证,只在必要时(简单说明:当1个或1个以上路径脏)保存,预先保存钩的登记等。

不过,没有恐惧,因为蒙戈斯的田田不耐蒙戈DB。 (使用蒙戈CLI或其他工具检查DB的实际内容)

您可以随时检查 < code> your document._doc , 该文档将保存预定保存到mongo 的实际字段 。





相关问题
Access DB Ref MongoDB

Whats the best way to access/query a DB Ref: UPDATE: users: name, groupref : {$ref:"groups",$id:"ObjectId ..." } } groups: name, topic, country,...,.. Assumption is that user belongs to only one ...

MongoDB nested sets

What re the best practices to store nested sets (like trees of comments) in MongoDB? I mean, every comment can have a parent comment and children-comments (answers). Storing them like this: { ...

MongoMapper and migrations

I m building a Rails application using MongoDB as the back-end and MongoMapper as the ORM tool. Suppose in version 1, I define the following model: class SomeModel include MongoMapper::Document ...

MongoDB takes long for indexing

I have the following setup: Mac Pro with 2 GB of RAM (yes, not that much) MongoDB 1.1.3 64-bit 8 million entries in a single collection index for one field (integer) wanted Calling .ensureIndex(...) ...

Storing and accessing large amounts of data

My application creates pieces of data that, in xml, would look like this: <resource url="someurl"> <term> <name>somename</name> <frequency>somenumber</...

热门标签