I store a couple of content objects in a mongodb collection:
{ ..., category: "example1", collection: 'collectionX' },
{ ..., category: "example2", collection: null },
{ ..., category: "example1", collection: null }
I want to query the third option by the following query:
[
{ '$match': { 'category': 'example1' } },
{ '$match': { 'collection': null } }
]
Unfortunately, the result is empty. The query for both options separately returns the expected result. What is wrong?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…