这是一个创建于 3998 天前的主题,其中的信息可能已经有所发展或是发生改变。
By default all references are stored as a DBRef with the traditional $id, $db and $ref fields but if you want you can configure your references to be simple and only store a MongoId.
_id: ObjectId("5297115940e7b47c050041ae"),
created_at: ISODate("2013-11-28T09:48:09Z"),
user: {
$ref: "user",
$id: ObjectId("5295afb940e7b4f8000041a7"),
$db: "xxx"
}
如果用 simple references,就没有 $ref, $db信息了,这样存储空间更小,但会不会存在什么问题?
1 条回复 • 1970-01-01 08:00:00 +08:00
|
|
1
ijse 2013-11-28 19:51:36 +08:00
应该不会吧,, stackoverflow上好多人也推荐用simple reference..
|