Start a new topic

compound queries not working

I am following your documentation for compound queries exactly.


var userCollection = new Kinvey.Backbone.UserCollection();

var promise = userCollection.fetch({

discover : true,

query : query.equalTo('last_name', 'Wood').or().equalTo('last_name', 'Roe'),

success : function(collection, response, options) {'user check response:' + JSON.stringify(userCollection));





This throws the 'error' callback with no information.

If I change the query to

query.equalTo('last_name', 'Wood'), I get a 'success' callback with the data that I was expecting.

Please update your documentation or tell me what I'm doing wrong.


You are using [User Discovery]( Here, only the equalTo operator is supported, the `or()` operator will therefore not work.

You can either not use User Discovery, or, if you need it, run two separate queries: one with `last_name: "Wood"` and one with `last_name: "Roe"`.
Great, thanks for the info : )
Login or Signup to post a comment