balderdashy/waterline — pull request #233 by marionebl (2014-01-15 23:31:25+00:00)
Title: Fix cache lookup for find queries without joins

The previous implementation fell apart when `operations.run` returned the whole cache (desired behavior?). Using always the first collection's identity it sent an empty array to returnResults.

If using the identity here is not feasible, this should solve it, too:
`values = _.find(values, function(item){ return item.length > 0 });`