Question

Ex. There are 2 entities: "Parent" -->> "Child" with one-to-many relation.
"Child" has property NSString *myKey.
QuickBlox documentation provides an examples about relations between different QBCOCustomObject (QuickBlox: Get Related Records) but only for simple case: how to get "Child" instances with given "Parent" instance.

Is any possibilities to obtain all "Parents" associated with a "Childs" where every "Child" instances have a given "myKey" with one request?
Or I have to use two separate requests for each entities?

Was it helpful?

Solution

To give all Children for particular Parent:

https://api.quickblox.com/data/Child?_parent_id=<your_Parent_class_instance_id>

To give all 'Parents' ids associated with a "Childs" where every "Child" instances have a given "myKey":

https://api.quickblox.com/data/Child?myKey=<some_value>

then each Child has _parent_id field

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top