You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey i'm building a trailsjs based application with a mongo db managed via the trailpack-mongoose addon.
The current release of this addon uses mongoose ^4.7.7.
When i install this plugin in one of my trails models like so:
...
class MyModel extends Model {
static config() {
let config = {}
config.onSchema = (app, schema)=>{
schema.plugin(idvalidator);
}
return config
}
...
any calls to save a document hang.
let item = new MyModel(object);
item.save().then(neverGetsCalled)
I've been through the internals of the plugin and mongoose. and it seems to be an issue with the exec method in mongoose/lib/query.js on line 3087 that is called by the executeQuery method of this library . If the callback is passed as a second parameter to exec, as this library does, it is called by an internal promise resolve call, but the promise never resolves. I've tried changing this library to use a promise instead of passing a callback, but again it never resolves.
Any help would be greatly appreciated. I find it hard to imagine that this is an unknown mongoose issue with such an important method as query.exec
The text was updated successfully, but these errors were encountered:
Hey i'm building a trailsjs based application with a mongo db managed via the trailpack-mongoose addon.
The current release of this addon uses mongoose ^4.7.7.
When i install this plugin in one of my trails models like so:
any calls to save a document hang.
I've been through the internals of the plugin and mongoose. and it seems to be an issue with the exec method in mongoose/lib/query.js on line 3087 that is called by the executeQuery method of this library . If the callback is passed as a second parameter to exec, as this library does, it is called by an internal promise resolve call, but the promise never resolves. I've tried changing this library to use a promise instead of passing a callback, but again it never resolves.
Any help would be greatly appreciated. I find it hard to imagine that this is an unknown mongoose issue with such an important method as query.exec
The text was updated successfully, but these errors were encountered: