1

我想运行这个 JCR SQL2 查询:

SELECT * FROM [nt:base] WHERE path LIKE '/A/B/%'

但运行查询后,我得到以下异常:

javax.jcr.query.InvalidQueryException: Query:
SELECT * FROM [nt:base] WHERE jcr:(*)path LIKE '/A/B/%'; expected: (, ., =, <>, <, >, <=,
4

2 回答 2

1
SELECT * FROM [nt:base] WHERE ISDESCENDANTNODE([/A/B/%])

在这里阅读更多

于 2012-12-24T22:47:55.373 回答
0

我希望这将帮助您执行查询:

            javax.jcr.query.QueryManager queryManager;

            queryManager = jcrsession.getWorkspace().getQueryManager();
            String expression = "select * from [nt:folder] AS s WHERE ISCHILDNODE(s,'"+name+"')and CONTAINS(s.[edms:owner],'*"+userid+"*')  ORDER BY s.["+Config.EDMS_Sorting_Parameter+"] ASC";

            javax.jcr.query.Query query = queryManager.createQuery(expression, javax.jcr.query.Query.JCR_SQL2);
于 2015-09-14T11:09:39.590 回答