gpt4 book ai didi

android - 如何检索 Quickblox 自定义对象的相关记录?

转载 作者:行者123 更新时间:2023-11-29 21:14:21 31 4
gpt4 key购买 nike

我知道如何建立关系:

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());
}
}
});

但是,当我有父 ID 时如何检索?

最佳答案

你应该为此做一个单独的请求:

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

QBCustomObjects.getObjects(CLASS_NAME, requestBuilder, new QBCallbackImpl(){...

关于android - 如何检索 Quickblox 自定义对象的相关记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21826130/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com