Using Waterline (and Sails.js) how do I query for results of a many to many association limited exclusively to matching the entire criteria set?
Room.find({type:"1to1"}).populate('participants', { id: [ 1, 2] }).
then((rooms)=>{
// rooms array of records should only contain room records
// that have both participants with an id of 1 and 2,
// but not rooms with only one participant 1 or 2
})
I am looking for the result to only contain rooms
that have both specified users.