clemos / haxe-js-kit

Haxe tools and externs for Javascript and Node.js
MIT License
128 stars 42 forks source link

[mongoose] allow runinng custom code on a schema #137

Closed kevinresol closed 8 years ago

kevinresol commented 8 years ago

Allow running some code after a schema is initialized. Example:

@:schemaOptions({
    autoIndex: true,
    typeKey: '__type__',
    post: {
        _schema.index({'email.address': 1}, {unique: true});
    }
})
clemos commented 8 years ago

Thanks !