Skip to content Skip to sidebar Skip to footer

Casterror: Cast To Objectid Failed For Value "id Goes Here" At Path "_id" For Model "article"

I'm experiencing something a little strange and was wondering if someone can help me out. I have a MEAN application that is able to retrieve ALL records from MongoDB perfectly but

Solution 1:

this seems to be a known bug in the latest version of Mongoose. I'd recommend downgrading to 4.7.2:

https://github.com/Automattic/mongoose/issues/4867

Solution 2:

The problem might be on your view templating engine. make sure the route to the specific id is properly defined.

Post a Comment for "Casterror: Cast To Objectid Failed For Value "id Goes Here" At Path "_id" For Model "article""