如图,我建立了一个action表,想查找里面子对象joinObj的子对象id为1000的action对象。大概知道是使用type方法查询,具体应该怎么做呢?
PHP中文网2017-04-17 15:28:49
I don’t quite understand whether 1000 refers to the sub-object called 1000, or userID=1000
?
If it is the former, there is no way to write it. If it’s the latter, there should be
db.actions.find({"joinObj.1000.userID": 1000})
Please clarify the issue before we can continue the discussion.