Soll ich ein Dokument mit einem ObjectId als Primärschlüssel finden, indem Sie:Mongodb Suche nach ObjectId Benütze ich String oder ObjectId in Abfrage?
this._db
.collection('users')
.find({ _id: 'aaaaa0000000000000000000' })
.toArray();
oder
this._db
.collection('users')
.find({ _id: ObjectId('aaaaa0000000000000000000') })
.toArray();
sehen diese https://stackoverflow.com/questions/45617525/mongodb-query-find-all-by-userid/45618622#45618622 – elcabezon