not get related object by auto-load

I can’t get list Location objects when I retrieve list Restaurant objects. I imported file data in my app
https://github.com/Backendless/RestaurantToGo/tree/master/data
when I retrieve list Restaurant objects by

Backendless.Data.of( Restaurant.class ).find(queryBuilder, new AsyncCallback<List<Restaurant>>() {

but properties locations and owner in Restaurant.class have nothing. I have checked auto-load in console

How do you configure the queryBuilder object? What properties did you put into it?

I just set pagesize for querybuilder and I got objects table Restaurant but have nothing relation object owner and locations

Could you show what your Restaurant class looks like?

I use Restaurant class in link git ablove. I fix method below because I use sdk 4.0.0

public static void findAsync( DataQueryBuilder query, AsyncCallback<List<Restaurant>> callback )
 {
 Backendless.Data.of( Restaurant.class ).find( query, callback );
 }

and comment 2 methods :

public static BackendlessCollection<Restaurant> find( DataQueryBuilder query )
 public static Future<BackendlessCollection<Restaurant>> findAsync( BackendlessDataQuery query )
list = new ArrayList<>();
 queryBuilder = DataQueryBuilder.create();
 queryBuilder.setPageSize( 5 ).setOffset( 0 );
 Backendless.Data.of( Restaurant.class ).find(queryBuilder, new AsyncCallback<List<Restaurant>>() {
 @Override
 public void handleResponse(List<Restaurant> response) {
 list= (ArrayList<Restaurant>) response;
 }

 @Override
 public void handleFault(BackendlessFault fault) {

 }
 });

How do I get objects Locations, User relate for every object Restaurant? restaurant.getlocations() not return list Location relate

Here’s what I did:

    Imported the data from github into a test app Got the classes from github and put them into my project Remove all the methods which reference BackendlessCollection (since it is not available in 4.0 anymore) Selected auto-load for the "locations" property.
Here's the result from the debugger: http://support.backendless.com/public/attachments/70de6474e031ff458f63b99f3561b75e.jpg</img>

Could you also check in the debugger if the retrieved objects contain locations?

I don’t understand, this is my debugger

http://support.backendless.com/public/attachments/91bb4d2c79da9ef541f68ccb5ff3603c.PNG&lt;/img&gt;
http://support.backendless.com/public/attachments/59732f0ecb3750603dc103592a0c9bf6.PNG&lt;/img&gt;
http://support.backendless.com/public/attachments/629d0458bc014452e2bab112963b8c77.PNG&lt;/img&gt;

Could you zip up your project and upload it to either google drive or dropbox? Send the link to support@backendless.com and I will take a look it.

I delete my project and creat new project. Finnally, I also get list Location objects relate. I don’t know why, maybe because my IDE. Thank you very much! You are a very enthusiastically support.
Sorry my english is not good but I really really thanks for your help.

You are welcome and thank you for developing with Backendless. I am glad you got it working!

when I retrieve object Restaurant , I also get list Location, User relation. Now, I have a object Users, how to load Restaurant objects relation. I see, I can do it in console.

In order to load Restaurant objects for a User, you would need to follow this doc:

https://backendless.com/docs/android/doc.html#data_inverted_relation_retrieval

all of example are find all contacts for a specific phone book. Have a phonebookobjectId => get all contacts with whereclause, I don’t need this. I need have contactobjectId => get phone book relation. Do you have a example for I need?

Use this whereClause when searching in the PhoneBook table:

contacts.objectId = ‘specific objectId of contact’

It’s exactly what I need. Thanks