我想在BackAnd中过滤一个集合中的空外键或对象关系。
filter = [
{
"fieldName": "Parent",
"operator": "empty",
"value": ""
}
]下面是我的表/对象定义:
{
"name": "Tree",
"fields": {
"Title": {
"type": "string"
},
"Description": {
"type": "string"
},
"Parent": {
"object": "Certifications"
},
"Children": {
"collection": "Certifications",
"via": "Parent"
}
}
}当我尝试上面的过滤器时,我得到了这个错误:
The field "FK_Tree_Tree_Parent" is a relation field.
To filter relation fields please use the operator "in"这只返回表中的所有值:
filter = [
{
"fieldName": "Parent",
"operator": "in",
"value": ""
}
]有没有可能找回那些没有分配父级的记录?
发布于 2016-05-11 18:51:11
您可以将Queries与以下sql一起使用
SELECT * FROM Tree WHERE Parent IS NULL https://stackoverflow.com/questions/37154271
复制相似问题