Hello Itay,
I am not sure to understand your use case.
and you do not have any array
Also you are searching your document using the _id that is unique.. so the query
db.dados.find( { _id : 1 } );
This is based on the content of your dados collection.
It looks like your insert is not doing what you expect it to do.... but I do not know what you expect.
So if what you expect as document is:
{ "_id" : ObjectId("53f46dc14b1954038a4e8ccc"), "Dados" : [ { "_id" : 1, "Dados" : "comida16" } ] }
The following queries are working:
db.dados.find({"Dados":{$elemMatch:{_id:1}}})
db.dados.find({"Dados":{$elemMatch:{_id: {$gt : 0} }}})
Tug
@tgrall