RESOLVED: 2nd argument to `Model` must be a POJO or string code example
Example: Error('The 2nd parameter to `mongoose.model()` should be a '
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var caseNote = mongoose.model('caseNote');
var ObjectId=mongoose.Schema.Types.ObjectId;
var models = require('./');
var autopopulate = require('mongoose-autopopulate');
var docSchema_raw = new Schema({
decidingBody:{type:String},
},{discriminatorKey : '_type'});
var docSchema = caseNote.discriminator('doc', docSchema_raw);
var doc = mongoose.model('doc');
exports.docSchema = docSchema;
module.exports = doc;
module.exports = mongoose.model("metadata_image_table", imageMetadataSchema);