android - How to retrieve related records on Quickblox custom objects? -


I know how to create a relationship:

  QBCustomObject customObject = new QBCustomObject ( "Comment"); // Your Class Name Custom Object.Put (FieldHill, 99); CustomObject.put ("Text", "The first movie in the series was ..."); CustomObject.setParentId ("50aa4d8fefa357fa14000001"); QBCustomObjects.createObject (qbCustomObject, new QBCallbackImpl () {@Override complete at public zero (result result) {if (result.isSuccess ()) {QBCustomObjectResult qbCustomObjectResult = Result (QBCustomObjectResult) Result; QBCustomObject qbCustomObject = qbCustomObjectResult.getCustomObject (); Log .d ("new record:", new custom object.tostring ());} and {log (e. "Errors", results. Gate erosers (.) ToString ());}}});   

But, how do I get when I have a parent ID?

You should make a separate request for this:

  QBCustomObjectRequestBuilder Request Builder = New QBCustomObjectRequestBuilder (); Requestbuilder.eq ("_ parent_id", "50aa4d8fefa357fa14000001"); QBCustomObjects.getObjects (CLASS_NAME, requestbuilder, new QBCallbackImpl () {...    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -