apache/incubator-cordova-js — pull request #34 by mdineen (2012-10-13 16:13:52+00:00)
Title: Cordova needs to support BB10 WW Contacts.  This does it.

There is a techdebt in contacts.js where "or" values for filters need to be supported. The way this API is intended to work, all specified filters are applied and only the intersection (AND) is returned. There is no way in Cordova to specify a different value for each field, so the ability to return the union of all filter results (OR) is not supported. Per WebWorks team, the only approach to simulate this behaviour is to run the find multiple times and return the aggregate result. Because of the async calling pattern this causes a race condition between the searches, and a gating technique is required.

@gtanner suggested that jWorkflow would be appropriate, but that we can't create that dependency. We will work on a solution next week.