【发布时间】:2013-01-17 22:56:08
【问题描述】:
描述我所追求的最佳方式是从一个简化的演示 page 文档开始:
{
name: "Page Name"
blocks: {
"top-content": 50f0ded99561a3b211000001,
"bottom-content": 50f0ded99561a3b211000002
}
}
有没有办法可以定义这种与猫鼬的多对多关系,以便我可以通过top-content 和bottom-content 等字符串键查找它们?与此等效的关系类似于在多对多连接表中包含一个字符串。
重要:
- 我不想嵌入我正在引用的块,因为它们可能被多个页面引用。
【问题讨论】:
标签: node.js mongodb reference many-to-many mongoose