[英]Is it possible to access m.mtime or m.ctime from share.js in derby.js?
I notice that (I think) share.js creates a sub-document called m that contains mtime and ctime in my database. 我注意到(我认为)share.js创建了一个名为m的子文档,该文档在我的数据库中包含mtime和ctime。 Is there a derby.js way to $orderby
based on those attributes? 是否有基于这些属性的$orderby
byby derby.js方法?
Thanks 谢谢
I`m not sure, but you can try something like this: 我不确定,但是您可以尝试执行以下操作:
model.query('collectionName', {$orderby: {_m: {mtime: 1}}});
But anyway _m, _v, _type fields will be removed before you get document from model. 但是无论如何,_m,_v,_type字段将在从模型中获取文档之前被删除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.