Reputation: 2232
I want to run this JCR SQL2 query:
SELECT * FROM [nt:base] WHERE path LIKE '/A/B/%'
But after running the query I am getting the following Exception:
javax.jcr.query.InvalidQueryException: Query:
SELECT * FROM [nt:base] WHERE jcr:(*)path LIKE '/A/B/%'; expected: (, ., =, <>, <, >, <=,
Upvotes: 1
Views: 3264
Reputation: 58
I hope this will help you to execute the query:
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);
Upvotes: 0