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?