node.js - Waterline: query array using AND for elements -


i have model { title: 'title', tags: ['foo', 'bar'] }. how query documents containing tags foo , bar @ same time without going native?

i tried

contententry.find({tags: ['bar', 'foo'] }) 

but returns documents having either foo or bar in tags, while i'm interested in having both tags.

there exact answer in similar topic https://stackoverflow.com/a/33145145/679052 rather workaround sails-mongo adapter allows use $and operator


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -