Fix for MNT-16387 No results are returned for a CMIS query which contains IS NULL for documents with a NULL property

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@128209 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2016-06-20 20:50:42 +00:00
parent 6a17c7a688
commit 4b2d04a1fc
2 changed files with 24 additions and 2 deletions

View File

@@ -5738,6 +5738,21 @@ public class OpenCmisQueryTest extends BaseCMISTest
testQuery("SELECT * FROM cm:ownable ", 0, false, "cmis:name", new String(), true);
testExtendedQuery("SELECT * FROM cm:ownable ", 1, false, "cmis:name", new String(), false);
}
public void testTitled() throws Exception
{
testExtendedQuery("SELECT * FROM cm:titled where cm:title is null ", 0, false, "cmis:name", new String(), false);
testExtendedQuery("SELECT * FROM cm:titled where cm:title is not null ", 11, false, "cmis:name", new String(), false);
nodeService.setProperty(c10, ContentModel.PROP_TITLE, null);
testExtendedQuery("SELECT * FROM cm:titled where cm:title is null ", 1, false, "cmis:name", new String(), false);
testExtendedQuery("SELECT * FROM cm:titled where cm:title is not null ", 10, false, "cmis:name", new String(), false);
nodeService.setProperty(c10, ContentModel.PROP_TITLE, "meep");
testExtendedQuery("SELECT * FROM cm:titled where cm:title is null ", 0, false, "cmis:name", new String(), false);
testExtendedQuery("SELECT * FROM cm:titled where cm:title is not null ", 11, false, "cmis:name", new String(), false);
nodeService.removeProperty(c10, ContentModel.PROP_TITLE);
testExtendedQuery("SELECT * FROM cm:titled where cm:title is null ", 1, false, "cmis:name", new String(), false);
testExtendedQuery("SELECT * FROM cm:titled where cm:title is not null ", 10, false, "cmis:name", new String(), false);
}
public void testNotKeyword() throws Exception
{