Updating an object value in a nested array

There is some evidence that this is the culprit. See the answer here: node.js - throw new Error(`Could not find path "${filterPath}" in schema`); - Stack Overflow

They don’t say exactly what broke just that this worked in 5.x and started giving an error in 6.x.

Asya

Op in SO isn’t creating the model though, and Schema’s prototype has no crud method as member…maybe I’m misinterpreting.

Yet I’ve seen multiple errors reported in Mongoose 6x & testing in terminal seems good idea

I remember reading somewhere in the mongoose docs that you cannot have a field named “type” without jumping through some hoops

1 Like