CMDBuild Forum

Multiple questions using CQL filter

Hello,

I access our CMDBuild instance (Version 2.4.1) using the RESTv2 API and at the moment I'm checking out the CQL query execution. So there came up some questions:

1. Is there no "OR" operator in native CQL? I found this forum entry written in May 2016 (http://www.cmdbuild.org/forum/forum-in-english/89348876?b_start=0#172680265) and I also was able to use the "OR" operator by using nested SQL.

2. Is the "NULL" operator not implemented yet? I found the CQL grammar file (https://bitbucket.org/tecnoteca/cmdbuild/src/b4b128f43a1b/core/src/main/antlr3/org/cmdbuild/cql/?at=default) which also includes a "NULL" operator, but when using this operator like "from <Classname> where <Attribute> NULL" I always get all instances of this class. At the moment I also use nested SQL for this problem ("from <Classname> where Id IN (/(SELECT "Id" FROM "<Classname>" WHERE "<Attribute>" IS NULL)/)").

3. Is it possible to filter class instances by an attribute value of a referenced object? I expected that this query would work "from <Classname> where [<ReferenceDomain>].objects(<ReferenceAttribute> = '<value>')" but I get an error similar to the one described in this forum entry (http://www.cmdbuild.org/forum/forum-in-english/949336833?set_language=en&cl=en).

Currently I can solve all of the problems by using nested SQL, but I would appreciate if I could use native CQL.

Thanks for your help.

Marvin