1

I know how to create relation:

QBCustomObject customObject = new QBCustomObject("Comment"); // your Class name
customObject.put(fieldHealth, 99);
customObject.put("text", "The first film in the series was...");
customObject.setParentId("50aa4d8fefa357fa14000001");

QBCustomObjects.createObject(qbCustomObject, new QBCallbackImpl() {
@Override
public void onComplete(Result result) {
    if (result.isSuccess()) {
        QBCustomObjectResult qbCustomObjectResult = (QBCustomObjectResult) result;
        QBCustomObject qbCustomObject = qbCustomObjectResult.getCustomObject();
        Log.d("New record: ",newCustomObject.toString());
    } else {
        Log.e("Errors",result.getErrors().toString());
    }
}
});

But, how to retrieve when i have the parent id?

Cohelad
  • 121
  • 9

1 Answers1

2

You should do a separate request for this:

QBCustomObjectRequestBuilder requestBuilder = new QBCustomObjectRequestBuilder();
requestBuilder.eq("_parent_id", "50aa4d8fefa357fa14000001");

QBCustomObjects.getObjects(CLASS_NAME, requestBuilder, new QBCallbackImpl(){...
Rubycon
  • 18,156
  • 10
  • 49
  • 70
  • oh, thanks, i thought there is another request , specially for this.. but thanks anyway. – Cohelad Feb 18 '14 at 14:15
  • @Igor , please have a look on this link :- https://stackoverflow.com/questions/37318133/animatedly-reduce-button-size-on-press-and-regain-its-size-on-release – user2028 Sep 14 '17 at 18:01