Start a new topic

Get Entities which contains a specific KinveyRef


On Android i need get a list of entities with specific KinveyRef, for example :

Query q = mKinveyClient.query();

KinveyReference reference = new KinveyReference();



q.equals("collectionNameRef", reference);

AsyncAppData myData = mKinveyClient.appData("MyEntity", MyEntity.class);

myData.get(q, new KinveyListCallback() {


public void onFailure(Throwable t) {



public void onSuccess(MyEntity[] myEntities) {




But don't have any result. How I do?

1 Comment

First, you need to set that KinveyReference to be the value within a `MyEntity` object. In your code, you have an object called `reference` but you will need to set that on an entity. Then, after that, you will need to upload the modified entity to the backend using the save method.

Then, finally, you can do a query for the `MyEntity` and resolve the value of the reference.

take a look at our relational data guide, which might explain these concepts better:
Login or Signup to post a comment