how to define a trigger in a mongoose schema

is there any kind of trigger at mongoose model level which provide the capability to set the value of the open field = false when the number of the members collection reaches 100?

var mongoose  = require('mongoose');
var Schema    = mongoose.Schema;

var listSchema = new Schema({
  name: {
    type: String,
    required: true,
    trim: true
  },
  desc: {
    type: String
  },
  open: {
    type: Boolean,
    default: true
  },
  members: [{
    userid: {
      type: Schema.Types.ObjectId, ref: 'User'
    },
    prId: {
      type: Schema.Types.ObjectId, ref: 'PR'
    },
    checkedIn: {
      type: Boolean
    }
  }]
});

module.exports = mongoose.model('List', listSchema);

Triggers are not available in mongo. It's hard to say why you want to change documents when collection reaches some limit by maybe capped collection is what you really want?

new Schema({..}, { capped: { size: 1024, max: 100 } });

size is maximum collection size in bytes and max is maximum number of documents that can be inserted in collection.