-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.3.1
-
Fix Version/s: 5.3.2
-
Component/s: None
-
Impact type:Content model Change
-
Upgrade notes:
In MySQL, operator IN is case insensitive.
However NXQLQueryMaker produces queries of the form
... WHERE hierarchy.primarytype in ('...', 'File', '...') AND ...
This will incorrectly match a complex type 'file'.
You get errors like:
ERROR [SQLQueryResult] Could not fetch documents for ids: [9e247dc7-001f-46c8-b40c-5b2ff3b6c977, c2e8a9c1-5adc-4fbb-b188-c1a54797d4f9]
org.nuxeo.ecm.core.api.DocumentException: Unknown document type: file
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.newDocument(SQLSession.java:560)
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.newDocument(SQLSession.java:531)
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.getDocumentsById(SQLSession.java:596)
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLQueryResult.getDocumentModels(SQLQueryResult.java:98)
We need to rewrite the query for MySQL when we use the operator IN, to mark the primarytype column BINARY (or mark it directly in the table schema).
- is required by
-
NXP-7312 Fix queries using operator IN in their clauses for SQL Server
- Resolved