-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 8.10
-
Component/s: Content Views, Query & PageProvider, Rest API
-
Tags:
-
Sprint:nxfit 8.4.7, nxfit 8.4.8
-
Story Points:1
Say I have the ApplicationCommon schema with the country file. The schema prefix is ac.
Say I have a page provider:
<extension target="org.nuxeo.ecm.platform.query.api.PageProviderService" point="providers"> <coreQueryPageProvider name="QueryWithParams"> <pattern quoteParameters="true" escapeParameters="true"> SELECT * FROM File WHERE dc:format = "DOCX" AND ac:country = :country AND ac:topics = :topic </pattern> <pageSize>100</pageSize> </coreQueryPageProvider> </extension>
Notice the ac:country = :country part.
Now, do a REST request:
http://localhost:8080/nuxeo/api/v1/query/QueryWithParams?country=US&topic=IT
The result is an error, where it is obvious that nuxeo also replaced ac:country:
Invalid token <US > at offset 54 in query: SELECT * FROM File WHERE dc:format = "DOCX" AND ac'US' = 'US' AND ac'IT's = 'IT'
(AND ac'US' = 'US')