10-07-2016 05:13 AM
Hi guys,
I defined an aspect where the "typeDocument" property is defined :
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="idoc:ideodocModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>IdeoDoc Model</description>
<author>MERIEM BENSAID</author>
<version>1.0</version>
<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<!-- Import Alfresco Content Domain Model Definitions --><import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
</imports>
<namespaces>
<namespace uri="http://sante.documentaire.sqli.com/model/content/1.0" prefix="idoc" />
</namespaces><aspects>
<aspect name="idoc:typeDocument">
<title>Type du document</title>
<properties>
<property name="idoc:idTypedocument">
<title>identifiant du type</title>
<type>d:text</type>
<multiple>false</multiple>
</property>
<property name="idoc:libelleTypeDocument">
<title>Libellé du type</title>
<type>d:text</type>
<multiple>false</multiple>
</property>
</properties>
</aspect>
</aspects>
</model>
So I'm trying to execute the following query to get documents with "idTypedocument" equals to 9, but this query gets nothing.
SELECT * FROM vig:content content JOIN idoc:typeDocument typeDoc ON content.cmis:objectId = typeDoc.cmis:objectId WHERE content.cmis:objectId is not null AND typeDoc.idoc:idTypedocument = '9'
However when i execute tthe following query I get the results I want.
SELECT * FROM vig:content content JOIN idoc:typeDocument typeDoc ON content.cmis:objectId = typeDoc.cmis:objectId WHERE content.cmis:objectId is not null AND typeDoc.idoc:idTypedocument <= '9' AND typeDoc.idoc:idTypedocument >= '9'
The problem is that i'm only replacing the "=" operator with "<= AND >=" operators.
The type of the "idTypedocument" attribute is String and i'm using the version : (Version :Community - v4.2.0 (r63893-b12))
So am I forgetting something in the aspect/property definition?
Thanks in advance.
PS: the same problem with "IN" operator.
10-07-2016 09:21 AM
You cannot do those comparisons against a string, according to the CMIS spec. When comparing strings, you may only use "=, <>, [NOT] LIKE".
10-13-2016 01:03 PM
I'm sorry, I forgot to mention that the operators work just fine with the alfresco built in properties like the "title", that's why i asked if i am forgetting something in the aspect/property definition.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.