Tag: 了多对多的

node.js上使用mongoose的string的多对多关系

我可以用最简单的演示page文件开始描述我的最佳方式: { name: "Page Name" blocks: { "top-content": 50f0ded99561a3b211000001, "bottom-content": 50f0ded99561a3b211000002 } } 有没有一种方法可以用mongoose来定义这种多对多的关系,这样我就可以用top-content和bottom-content类的string来查找它们了? 与此相关的关系就像在多对多的连接表中包含一个string一样。 重要: 我不想embedded我引用的块,因为它们可以被多个页面引用。