Fix queries using operator IN in their clauses for MySQL
--------------------------------------------------------

                 Key: NXP-5183
                 URL: https://jira.nuxeo.org/browse/NXP-5183
             Project: Nuxeo Enterprise Platform
          Issue Type: Bug
    Affects Versions: 5.3.1
            Reporter: Thierry Martins
            Assignee: Florent Guillaume
             Fix For: 5.3.2


In MySQL, operator IN is case insensitive. 

Therefore, queries like "SELECT * FROM Document" returns elements whose primary 
type is not a valid document type and you could 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to