Alfresco CMIS查询检查NULL /空白 [英] Alfresco CMIS query checking for NULL/Blank

查看:105
本文介绍了Alfresco CMIS查询检查NULL /空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检查Aspect属性是否存在,如果存在,则不应为空...在某些文档中,应用了Aspect但未填充任何属性。在某些文档中,aspect的所有属性均已填充,但空白为空。

I want to check whether the Aspect property is present or not and if present it should not be blank... On some docs the aspect applied but no properties are populated. On some docs all the properties of aspect are populated but few are blank.

我在下面的查询中进行了尝试。

I tried below queries..

从myType:myCase中选择*作为d,然后将myAspect:myTest作为d加入d.cmis:objectId = p.cmis:objectId的WHERE

CONTAINS(d,'PATH: // app:company_home / cm :DROP-FOLDER / *')

select * from myType:myCase as d join myAspect:myTest as p on d.cmis:objectId = p.cmis:objectId WHERE
CONTAINS(d, 'PATH:"//app:company_home/cm:DROP-FOLDER/*"')

我也尝试了
p:myAspect:caseId =<>''
** p:myAspect:caseId不为空(不给出错误

I also tried p:myAspect:caseId = <> '' **p:myAspect:caseId IS NOT NULL (Doesn't give error but return the row with blank property value)

简而言之,如何检查Aspect属性是否存在以及是否存在空白?

In short how can I check whether the aspect property is present or not and if present it is not blank?

谢谢

推荐答案

我不确定我理解您的意思是如果存在,则不应空白(您可能正在考虑属性)。如果要检查是否存在某些方面,请选择以下选项:

I'm not sure I understand what you mean by "if present it should not be blank" (you're probably thinking about properties). If you want to check whether some aspect is there, this in an option:

SELECT * FROM cmis:document where contains('ASPECT:\'myNs:myAspect\ \'')

SELECT * FROM cmis:document where contains('ASPECT:\'myNs:myAspect\'')

但是请注意事务查询。
http://docs.alfresco.com/5.0/概念/intrans-metadata-query.html

Be careful about transactional queries, though. http://docs.alfresco.com/5.0/concepts/intrans-metadata-query.html

这篇关于Alfresco CMIS查询检查NULL /空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆