Start a new topic

Joining Operators are not working

Hey Kinvey. We're currently having an issue using the JoiningOperators.

When we run the code, it does not return anything. The setup we have is that all information in our app is applicable to a 'group'. E.g. Milk, butter and bread all belong to the "shopping list" group (as an example). On the dashboard, a user has to select a group in order to see info within it... yet no groups are showing up at all...

Here's the code:

var query = new $kinvey.Query();

query.equalTo('_id', '5438bcf1c372846422050269’).or().equalTo('_id', '543cc642c3728464220547b6');

$kinvey.DataStore.find('groups', query).then(function (data) {


}, function (error) {



This code does not return any result, because I am using JoiningOperators which is: .or()

I need it to make groups work, if this code works, it should return 2 elements in array but instead it’s returning nothing.

Please let us know if you need any more information.... thanks!

Sorry to hear you are having some trouble! Would you mind posting the actual URL that is being requested? You can find in the Network panel of Chrome Devtools, for instance.

This will help us understand if the query is being constructed properly.
Hello Dave,

Thank you for your response.

This is Request URL we have:
Query we are doing is:

var query = new $kinvey.Query();

query.equalTo('_id', '5438bcf1c372846422050269').or().equalTo('_id', '543cc642c3728464220547b6');

$kinvey.DataStore.find('groups', query).then(function (data) {

//var 'data' here is empty, where it should return 2 items in array.

@Dave‌ any update on this? This is so urgent to us right now... if you have time could you please get back to us? Thanks!
Sorry for the delayed response here!

First up, an alternative way to perform this query would be using the contains operator:

`query.contains('_id', [ '', '', ... ])`

Secondly, I can't seem reproduce the query you pasted with the code you used. Are you sure that URL you pasted is the same one being requested by the query? I'll keep looking in the meantime.
Login or Signup to post a comment