I’m trying to run this query using mongoose against a db created by a meteor app and simple schema…
await Organizations.find({_id: {$in: orgIds}})
Getting this error
CastError: Cast to ObjectId failed for value "PS63k9zXwxtx3Lz8y" at path "_id" for model "Organizations"
UPDATE:
It was just a matter of adding an _id as a string to the mongoose schema
e.g.
const schema = new Mongo.Schema({
_id: String,
email: {
type: String
},