对于以下文档结构-
{
"_id" : ObjectId("5cf25412326c3f4f26df03ae"),
"restaurantId" : "18471268",
"items" : [
{
"itemId" : "F4QJAMWKHY",
"name" : "Seafood Grill Squared Burger",
"imageUrl" : "",
"price" : 236,
"attributes" : [
"Spicy",
"Gravy"
]
},
{
"itemId" : "MNA8IHX74Q",
"name" : "Crumb Fried Fish Burger",
"imageUrl" : "",
"price" : 265,
"attributes" : [
"Sweet",
"Sweet"
]
}
]
}
...
我想在itemid列表的基础上获取所有菜单,我将其作为列表传递。
以下查询似乎不起作用。
@Query(value = "{ 'items' : {$elemMatch : {'itemId' : {$in : ?0}}}}")
List<MenuEntity> findMenuByItemId(List<String> itemIds);
暂无答案!
目前还没有任何答案,快来回答吧!