jamescarr/mongoosastic — pull request #28 by phillro (2012-07-19 20:27:24+00:00)
Title: Handling schemas with nested blank objects

The following is a valid schema, but would break existing mapping generator.

var Example = new Schema({
"meta":{
"normal_score":{type: Number},
"uniform_score":{type: Number},
"scoreDate":{"type":Date, es_type:'date'},
},
"createdAt":{"type":Date, "default":Date.now, es_type:"date"},
"updatedAt":{"type":Date, "default":Date.now, es_type:"date"}
})

Check if(value[0].tree && value[0].paths)