These are chat archives for LearnBoost/mongoose

4th
Feb 2015
Maksim
@chetverikov
Feb 04 2015 04:46
Hi! How can i do follow:

var globals_schemas = require(‘app/globals’)

var PlaceSchema = new Schema({
  identity: String,

  // here other fields

  location: globals_schemas.location_schema

})
I want to use the same scheme ( location ) in different schemes.
Joseph Thibeault
@jrthib
Feb 04 2015 18:39
Does anyone know if you can specify the priority or order in which schema plugins will run?
For example, I have one plugin which creates an order number, then a second one which needs to use that order number. Everything is executed pre-save.
Joseph Thibeault
@jrthib
Feb 04 2015 18:51
Oh, it looks like they run in the order that they are added to the schema, as long as it uses the next() function and not the async done() function