使用第三方驱动比如monogoose等驱动时在插入数据时可以指定数据类型。var dbgoose = require('./db');var mongoose = dbgoose.mongoose;var conn =dbgoose.dbConnection;var ObjectId = mongoose.Schema.ObjectId;var CompanySchema = new mongoose.Schema({