我在mongoDB docs上找到了 这个例子。
{
_id: "joe",
name: "Joe Bookreader" }
{
patron_id: "joe",
street: "123 Fake Street",
city: "Faketon",
state: "MA",
zip: "12345"
}
{
patron_id: "joe",
street: "1 Some Other Street",
city: "Boston",
state: "MA",
zip: "12345"
}
它还指出,您只能通过一个查询来检索完整的顾客信息。
我想要这样的结果
{
_id: "joe",
name: "Joe Bookreader",
addresses: [
{
street: "123 Fake Street",
city: "Faketon",
state: "MA",
zip: "12345"
},
{
street: "1 Some Other Street",
city: "Boston",
state: "MA",
zip: "12345"
}
]
}
非常感谢您的帮助
答案 0 :(得分:0)
我明白了。如果有人正在寻找一对多的关系解决方案,这里就是
ax1.set_prop_cycle(marker=['o','s','x','+','*'], color=plt.rcParams["axes.prop_cycle"].by_key()["color"][:5])