vadimdemedes / mongorito

🍹 MongoDB ODM for Node.js apps based on Redux
1.38k stars 90 forks source link

Amend issues with findById using string #174

Closed EdenCoder closed 7 years ago

EdenCoder commented 7 years ago

findById doesn't pass mongoDB ObjectID and therefore will always return null when searching by string.

vadimdemedes commented 7 years ago

This is an intended behavior, there's no auto casting to ObjectId in Mongorito. See https://github.com/vadimdemedes/mongorito/issues/183#issuecomment-311105030.