NXQL query with backslash

I am trying to execute this query with CoreSession:

CoreSession.query( “select * from Document where dc:title = 'document\' and ecm:currentLifeCycleState <> 'deleted'” )

The \ is making the query crash. If I put the \ in any other position than at the end it works. I also have tried to escape the title value with NXQLQueryBuilder.prepareStringLiteral() with it doesn't do anything. Any idea about how to execute this query or could be a Nuxeo bug?

0 votes

1 answers



Have you tried a double backslash just before the single quote?

Yes, it also fails. dc:title = 'document\\' is not working

Thanks for the report, it's a bug in the parser. A ticket has been entered: NXP-10340. You can Watch the ticket to be notified when a fix is done.

0 votes

Thanks, I will wait for the fix.