标签: node.js mongodb mongoose nosql
这是the query in this question
我有这些Mongoose Schemas:
var Thread = new Schema({ title: String, messages: [Message] }); var Message = new Schema({ date_added: Date, author: String, text: String });
如何使用最新的Message子文档(限制1)和所有没有任何Message子文档的线程返回所有线程?
Message