var pFreqDeliver=goose.frequency
.find({'block':data.block})
.exec(function(e,a) {
console.log('inside pFreqDeliver...');
console.log(a);
var resp={'block':data.block,'content':a};
socket.emit("rxfrequpdate",resp)
});
var pDoIt=pTalent.then(function(){console.log('pTalent Done');})
.chain(pOutput)
.then(function(){console.log('pOutput Done');})
.chain(pFreq)
.then(function(){console.log('pFreq Done');})
.chain(pFreqUpdate)
.then(function(){console.log('pFreqUpdate Done');})
.chain(pCommit)
.then(function(){console.log('pCommit Done');})
.chain(pFreqDeliver)
.then(function(freqs){
console.log(freqs);
console.log('pFreqDeliver Done');
});
pDoIt.fulfill();
I have only shown the problematic promise... pFreqDeliver.
Whereas there is heaps of data in this collection - the console log shows undefined upon return.
If I change this to a find(<conditions>,<callback>) pattern, I can see data, but the promise structure breaks.
Any ideas?
Thanks in advance...
Mark...
var Q = require('q');mongoose.Query.prototype.qexec = function () {return Q.npost(this, 'exec', arguments);}
--
Documentation - http://mongoosejs.com/
Plugins - http://plugins.mongoosejs.com/
Bug Reports - http://github.com/learnboost/mongoose
Production Examples - http://mongoosejs.tumblr.com/
StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
Google Groups - https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
Twitter - https://twitter.com/mongoosejs
IRC - #mongoosejs
---
You received this message because you are subscribed to the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-orm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongoose-orm/z8BVQViSGCA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongoose-orm...@googlegroups.com.
regards,
Mark P. Edwards