亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

mongodb 文檔數(shù)組查詢的一個問題
滿天的星座
滿天的星座 2017-04-27 09:02:45
0
2
915

1對多群發(fā)消息,文檔結構如下:

{
"from_uid" : 10000,
"to_uid" :
[

{ "user_id" : 100002, "is_read" : 1, "is_del" : 1 }, 
{ "user_id" : 100003, "is_read" : 0, "is_del" : 0 }, 
{ "user_id" : 100004, "is_read" : 1, "is_del" : 0 } 

]
}

其中to_uid.user_id=100002,設置為is_del=1。執(zhí)行以下指令的時候,這個文檔還會顯示。 貌似查詢條件里的"to_uid.user_id" "to_uid.is_del" 是或的關系?

db.notice.find({"to_uid.user_id":100002, "to_uid.is_del":0 , "create_time":8})

滿天的星座
滿天的星座

reply all(2)
僅有的幸福

db.notice.find({"to_uid":{$elemMatch:{"user_id":100002,"is_del":0}}"create_time":8})

Peter_Zhu

I encountered the same problem, and I always thought it was or , not &&,
I wonder if the author has solved it?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template