Forse una seconda serie di occhi può vedere ciò che è sbagliato con il mio schemaNodeJS - MongooseJS errore schema che Non riesco a capire
var UserSchema = new Schema({
name:
{
first : {type: String}
, last : {type : String}
}
, password: {type: String}
, username: {type: String}
, role: RoleSchema
, created_at : {type : Date, default : Date.now}
, modified_at : {type : Date, default : Date.now}
})
var RoleSchema = {
type: [String]
, study_type: [String]
}
mongoose.model('User', UserSchema)
l'errore:
TypeError: Invalid value for schema path `role`
grazie mille per la tua risposta .... Trascorro più di 6 ore su questo ... :( – Machete