We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS和Android里的关联查询都有$relatedTo,为什么flutter里的却没有,官网举的例子也有问题,因为看代码并不能关联起来,求解答。
The text was updated successfully, but these errors were encountered:
A表关联了多个B,难道必须B里面有一个参数A_id来判断是否属于某个A吗
Sorry, something went wrong.
突然想起在这提了Issues,补充一下之前的解决方案,首先Flutter源码确实缺少了relatedTo方法,所以我参考了Android的relatedTo源码,反推了flutter的代码如下,将该方法加在BmobQuery类里调用即可,跟原生Android的relatedTo的使用是一样的。
void addWhereRelatedTo(String key,Object value){ BmobObject bmobObject =value; Map<String,dynamic> map = new Map(); map["_type"] = "Pointer"; map["objectId"] = bmobObject.objectId; map["className"] = value.runtimeType.toString(); Map<String,dynamic> map1 = new Map(); map1["object"] = map; map1["key"] = key; where["\$relatedTo"] = map1; }
No branches or pull requests
IOS和Android里的关联查询都有$relatedTo,为什么flutter里的却没有,官网举的例子也有问题,因为看代码并不能关联起来,求解答。
The text was updated successfully, but these errors were encountered: