MongoDB fragt mit Nullwert ab

Meiner Sammlung (MongoDB v 2.0.2) hat folgende Datensätze:

db.organization.find({})
{ "_id" : 1001, "path" : [ ], "parent" : null }
{ "_id" : 1002, "path" : [ 1001 ], "parent" : NumberLong(1001) }

organization Indizes:

db.organization.ensureIndex({"path":1});
db.organization.ensureIndex({"parent":1},{sparse:false});

(Hinweis: ich lege awarnes sparse : false - zu erteilen, die null-indiziert)
Aber, Ausführung:

db.organization.find({"parent":null})

Gibt eine leere Menge. Was ist falsch? Vielen Dank im Voraus

InformationsquelleAutor der Frage Dewfy | 2012-02-16

Schreibe einen Kommentar