MongoDB/Mongoose: On save > Push comment into array, in the array you'll see comment + date
问题 I have a mongoose model const clientSchema = mongoose.Schema({ Created: { type: String }, kundnr: { type: String, unique: true, required: true }, namn: { type: String }, adress: { gata: String, postkod: Number, stad: String }, kontakt: { email: String, telefon: Number, }, company: { type: mongoose.Schema.Types.ObjectId, ref: 'Company' }, notering: [{ type: String, }], lan: [{ type: String }] }, { timestamps: true }); module.exports = mongoose.model('Client', clientSchema); ` and then theres