I have a table of doctors, and second table is of prescriptions.
I want to show doctors screen with lets say 50 doctor/page, and i also want to show number of prescriptions prescribed by each doctor.
You can get a count with a separate query for a doctor using BackendlessDataQuery with PageSize = 1 in QueryOptions, but that would require a separate call for every doctor.
this method is still a big No, we will have to make 50 extra calls for showing 50 doctors.
Is there any planned feature to solve this?
There are other BAAS that solve this issue by providing Graph Queries/APIs.
There are other ways to “solve” this. You can modify the data model to include the information without calculating the totals every time. You can create a server-side service to optimize the retrieval.
Currently there are no plans to offer graph queries
Serverside service = Serverside Script on Backendless Server?
What you can do is provide aggregateable properties, some clouds do that too.
So that property will be based on table’s relations with functions like count, average etc
so if i create a new aggregate property like total_prescriptions, then it will be automatically updated whenever a new prescription is added or deleted.