本文介绍了AEM:如何查找具有属性名称“ customProp”的节点和空的属性值,使用查询生成器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有些节点具有属性,但没有值。
There are nodes which have properties but no values.
我试图避免查询生成器中的那些节点使用
I am trying to avoid those nodes in query builder using,
path=/content/
type=cq:Page
2_property=jcr:content/customProp
2_property.operation=exists
3_property=jcr:content/customProp
3_property.operation=unequals
3_property.value=
但是空值条件(3_property)被忽略。
如何实现?
But the empty value condition (3_property) is being ignored.How this can be achieved?
推荐答案
我遇到的问题是寻找所有没有价值的财产。
我构造了以下SQL2查询:
I had the issue to search for all occurrence of a propertiy with no value.I constructed the following SQL2 Query:
SELECT * FROM [{{jcr:primaryType}}] AS ref WHERE ISDESCENDANTNODE([{{Start Path}}]) AND ref.[{{Property Name}}] = ''
在您的情况下,我认为类似的东西应该起作用
In your case I think something like should work
SELECT * FROM [{{jcr:primaryType}}] AS ref WHERE ISDESCENDANTNODE([{{Start Path}}]) AND NOT(ref.[{{Property Name}}] = '')
这篇关于AEM:如何查找具有属性名称“ customProp”的节点和空的属性值,使用查询生成器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!