Mongoose, CastError: Cast to Array failed for value when trying to save a model that contains a model
Man, I had a similar issue creating an Schema like this: QuestionnaireSchema = mongoose.Schema({ formId: Number, name: String, questions: [ { type: String, title: String, alternatives:[{ label: String, value: “Mixed” }] } ] }); My mistake was that I am using “type” as a field name and this is reserved word in mongoose. I just …