我试图执行以下 jcr sql2 查询:
String expression = "SELECT * FROM [nt:base] AS p " +
"WHERE NAME(p) like 'opony.txt'";
但我得到了
javax.jcr.UnsupportedRepositoryOperationException.
是否有任何其他方式来搜索名称类似于“%example%”的节点?
我也试图搜索具有指定路径的节点
String expression = "SELECT * FROM [nt:base] " +
"WHERE PATH([nt:base]) like '/a/b'";
但我得到了
javax.jcr.query.InvalidQueryException: Query:
SELECT * FROM [nt:base] WHERE PATH([(*)nt:base]) like '/a/b'; expected: LENGTH, NAME, LOCALNAME, SCORE, LOWER, UPPER, or CAST
如何搜索路径类似于“%example%”的节点?
我正在使用 JCR_SQL2
javax.jcr.query.Query query = queryManager.createQuery(expression, Query.JCR_SQL2);