Item.find().sort([['_id','descending']]).limit(15).each(function(doc) {
client.send(JSON.stringify(doc));
});
返回此錯誤:的MongoDB /貓鼬排序錯誤
Error: Error: Illegal sort clause, must be of the form [['field1', '(ascending|descending)'], ['field2', '(ascending|descending)']]\n
任何想法?謝謝!
STIL得到這個錯誤`{ 「堆疊」:「錯誤:錯誤:非法排序條款,必須是這樣的形式[ '字段1',「(升序|降序)'],['field2','(升序|降序)']] \ n在[object Object] .nextObject(/opt/local/lib/node/.npm/mongoose/1.1.24/package/支持/ node-mongodb-native/lib/mongodb/cursor.js:460:16)\ n在Array.0(/opt/local/lib/node/.npm/mongoose/1.1.24/package/lib/mongoose /query.js:651:16)\n在EventEmitter._tickCallback(node.js:126:26)「,」message「:」錯誤:非法排序子句必須是[['field1','(升序|降序]'],['field2','(升序|降序)']]「}' – fancy 2011-04-15 16:15:24