Hi - Can I fetch only selected columns of Child objects (instead of whole object) - while doing an Auto-load or Single-step relations retrieval ??
In what programming language?
Java - android ??
When you create an instance of BackendlessDataQuery, use the following constructor:
public BackendlessDataQuery( List<String> properties );
where “properties” contains a list of the properties which should be returned.
I dont think you can put children property names like that - this seems to take only parent property names.
I tried - and it game exception:
BackendlessException{ code: ‘1006’, message: ‘Unable to retrieve data. Query contains invalid object properties.’ }
It depends on how you structure the query.
What is the reason you need only a subset of properties? is it performance and time it takes to bring the data back to the client? With what you’re asking, you still will be getting strongly typed objects, only some properties will be initialized.
Mark
yes, to save on performance and bandwidth - so to avoid downloading 10-15 properties, when I only want 2 properties - important especially as I intend to download ~1000 objects at login time.
i tried as ‘dataQuery.addProperty(customer.name)’ - and it failed. It also has a where clause on parent properties.
You can download no more than 100 objects at a time - you will need to use paging.
You will need to create BackendlessDataQuery as I showed to you, but the whereClause needs to be in the following format:
ParentTableName[ relationPropertyForTheChildren ].objectId = parentObjectId