Hi,
I face frequent errors when querying a table in mongo that has not yet been filled.
I can catch errors of source but this is a bit annoying. Should not mongokit ask either table creation (empty) or return empty set?
Example:
In this case I do a mapreduce but I never inserted data before.
.....2013-02-28 07:33:03,789 ERROR [mobyle.web.stat_views][MainThread] Could not exec mapreduce on stats: command SON([('mapreduce', u'monthlystatistics'), ('map', Code('function () { for(var job in this.jobs) { emit(job, this.jobs[job]); };}', {})), ('reduce', Code("function (key, values) { var total = {}; for (var i = 0; i < values.length; i++) { if(total['key']==null) { total['key']=0; } total['key'] += values[i]; } return total;}", {})), ('out', {'inline': 1})]) failed: ns doesn't exist
I also faced the case for other find operations on Documents, when no document has been inserted before.
Thanks
Olivier