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
Post a Comment