1var mongoose = require("mongoose");
2
3var subSchema = mongoose.Schema({
4 //your subschema content
5},{ _id : false });
6
7var schema = mongoose.Schema({
8 // schema content
9 subSchemaCollection : [subSchema]
10});
11
12var model = mongoose.model('tablename', schema);