No error. Just rewrote the last bit to double check again:
var getPhotosets = function(venue_id) {
var nVenue = mongoose.model('Venues');
nVenue.findOne({ "_id" : venue_id}, function(err, myvenue) {
if (!err) {
console.log(venue_id + ' is: ' + myvenue);
} else {
console.log('Error: ' + err);
}
});
}
Last night I also scrapped the rest of the schema's except for this:
var Venues = new Schema({
name : { type: String }
});
I also exported my hosted DB and restored to my local computer
( thinking it was an issue with
mongohq.com, but I'm still having the
same problem. I did notice from the mongod web console that I can see
the query just sitting there:
conn 13 R 2004 mydb.venues { query: { _id:
ObjectId('4bdd1bac8813f575f8000001') } }
127.0.0.1:57063
It goes away when I kill the script with ctrl-c. Should I be closing
the connection some how?