LearnBoost/mongoose — pull request #2428 by JNK (2014-10-31 12:04:19+00:00)
Title: Added globalConditions to schema options

This allows you to apply a fixed condition to every mongoldb query.

Example:
var userSchema = new Schema({
globalConditions: {
_type: 'user',
},
collection: 'accounts',
});

var adminSchema = new Schema({
globalConditions: {
_type: 'admin',
},
collection: 'accounts',
});

var accountSchema = new Schema({
collection: 'accounts',
});

This way you can easily manage single table inheritance.