pgte / alfred

Node is your mansion, Alfred is your butler. Node.js key-value store
http://pgte.github.com/alfred/
MIT License
149 stars 10 forks source link

stream has no method 'on' #14

Open sergioramos opened 12 years ago

sergioramos commented 12 years ago
var stream = article.find({date: {$range: {$start: null, $end: null}}}).stream();

stream.on('record', function(record) {
  console.log(record);
});
stream.on('error', function(err) {
  throw(err);
});
stream.on('end', function() {
  console.log('ended');
});

throws

TypeError: Object function (callback) {
    return chainable.execute(callback);
} has no method 'on'
at checkRemoved (/Users/ramitos/Sites/node/quodsi/helpers/db.js:219:9)
at /Users/ramitos/Sites/node/quodsi/helpers/db.js:158:3
at /usr/local/lib/node_modules/async/lib/async.js:105:25
at /Users/ramitos/Sites/node/quodsi/helpers/db.js:184:11
at /usr/local/lib/node_modules/alfred/lib/alfred/meta/model/model.js:203:9
at /usr/local/lib/node_modules/alfred/lib/alfred/meta/finder.js:204:13
at /usr/local/lib/node_modules/alfred/lib/alfred/key_map.js:151:9
at /usr/local/lib/node_modules/alfred/lib/alfred/collection.js:121:7
at /usr/local/lib/node_modules/alfred/lib/alfred/files/file.js:207:11
at Object.wrapper [as oncomplete] (fs.js:254:17)