I have a 2 Tables, User and Prescriptions where User has one to many relationship with Prescriptions.
Currently im getting attached prescriptions of a user using following query
But i now want two things
1- retrieve those prescriptions whose medication column has “care” or some keyword given in it.
2- How to paginate this data?
https://api.backendless.com/v1/data/Users/{userid}?loadRelations=prescription&where=users["prescriptions"].objectId=user_object_id and medication Like 'care%'
You need to send the request with the where clause I showed to the Prescriptions table. Do not use loadRelations, simply load objects with that where clause from Prescriptions.
Sorry for misunderstanding, here is another attempt,
https://api.backendless.com/<version>/data/Prescription?where=whereClause:Users["prescriptions"].objectId = <user object id> AND medications Like 'care%'
if i fail can you make a sample url, otherwise ill throwing arrows in dark?
https://api.backendless.com/<version>/data/Prescription?where=Users[prescriptions].objectId = '<user object id>' AND (medication_a Like 'care%' OR medication_b Like 'care%' )