Alfresco CMIS query checking for NULL/Blank

吃可爱长大的小学妹 提交于 2019-12-14 03:58:32

问题


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..

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/*"')

AND 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)

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

Thank you


回答1:


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\'')

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



来源:https://stackoverflow.com/questions/42903935/alfresco-cmis-query-checking-for-null-blank

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!