Apache CMIS: ORDER BY clause with custom properties

865 views Asked by At

It seems like the query result can be ordered by document custom properties, because I always get Null exception, for example, this query is working:

SELECT * FROM my:document ORDER BY cmis:name

but when I replace cmis:name with something else, for example:

SELECT * FROM my:document ORDER BY mycustomproperty:displayname

it seems like that property behind ORDER BY clause is not passed to final query, because when I look at log, the exception reason is as follows:

Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: null
[SELECT i from com.my.docs.repository.entity.DocumentItem i WHERE i.versionable = false
AND i.latestVersion = true AND i.typeDefinition.id IN ('my:document') ORDER BY ]

As you can see, there is nothing after ORDER BY, like CMIS can't inject my custom property from query. Is there a workaround for this issue?

0

There are 0 answers