【发布时间】:2014-02-14 16:17:39
【问题描述】:
我有一个收藏:
{name : 'hello', tags : ['foo', 'bar']}
,{name : 'world', tags : ['space', 'bar']}
,{name : 'galaxy', tags : ['foo', 'space']}
,attributes: {
,name: {
type: 'STRING'
,required : 'string'
}
,tags: {
type: 'ARRAY'
,required : 'array'
}
}
};
我尝试过,但它不起作用:
myCollection.find().where({tags: ['space' ,'foo']});s
如何搜索具有特定标签的所有项目?
谢谢你
【问题讨论】:
-
我一拿到我的个人开发机器就会深入研究这个问题。与此同时,您可以涉足此处记录的 Waterline 查询语言:github.com/balderdashy/waterline-docs/blob/master/…
标签: javascript node.js sails.js