[ 
https://jira.nuxeo.org/browse/NXP-5435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anahide Tchertchian reassigned NXP-5435:
----------------------------------------

    Assignee: Anahide Tchertchian  (was: Florent Guillaume)

> Fix NXQL ORDER BY on multiple and identical columns
> ---------------------------------------------------
>
>                 Key: NXP-5435
>                 URL: https://jira.nuxeo.org/browse/NXP-5435
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>          Components: Core SQL Storage
>    Affects Versions: 5.3.2
>            Reporter: Anahide Tchertchian
>            Assignee: Anahide Tchertchian
>             Fix For: 5.4
>
>
> When ordering twice on dc:title for instance, query execution throws the 
> following error:
> SELECT * FROM Document WHERE ecm:parentId = 
> '075d72d8-0dfc-426f-bd21-6961eef54fed' AND ecm:isCheckedInVersion = 0 AND 
> ecm:mixinType != 'HiddenInNavigation' AND ecm:currentLifeCycleState != 
> 'deleted' ORDER BY dc:title , dc:title
> Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: 
> org.nuxeo.ecm.core.storage.StorageException. message: Invalid query: SELECT * 
> FROM Document WHERE ecm:parentId = '075d72d8-0dfc-426f-bd21-6961eef54fed' AND 
> ecm:isCheckedInVersion = 0 AND ecm:mixinType != 'HiddenInNavigation' AND 
> ecm:currentLifeCycleState != 'deleted' ORDER BY dc:title , dc:title
>       at 
> org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.query(JDBCMapper.java:661)
>       at 
> org.nuxeo.ecm.core.storage.sql.CachingMapper.query(CachingMapper.java:85)
>       at 
> org.nuxeo.ecm.core.storage.sql.SessionImpl.query(SessionImpl.java:830)
>       at 
> org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession$SQLSessionQuery.execute(SQLSession.java:506)
>       ... 22 more
> Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: 
> org.h2.jdbc.JdbcSQLException. message: Column _C3 not found; SQL statement:
> SELECT "_C1" FROM (SELECT "HIERARCHY"."ID" AS "_C1", "DUBLINCORE"."TITLE" AS 
> "_C2" FROM "HIERARCHY" LEFT JOIN "MISC" ON "HIERARCHY"."ID" = "MISC"."ID" 
> LEFT JOIN "DUBLINCORE" ON "HIERARCHY"."ID" = "DUBLINCORE"."ID" LEFT JOIN 
> "VERSIONS" ON "HIERARCHY"."ID" = "VERSIONS"."ID" WHERE 
> "HIERARCHY"."PRIMARYTYPE" IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND 
> ("HIERARCHY"."PARENTID" = ?) AND ("VERSIONS"."ID" IS NULL) AND 
> ("MISC"."LIFECYCLESTATE" <> ?) UNION ALL SELECT "_H"."ID" AS "_C1", 
> "DUBLINCORE"."TITLE" AS "_C2" FROM "HIERARCHY" "_H" JOIN "PROXIES" ON 
> "_H"."ID" = "PROXIES"."ID" JOIN "HIERARCHY" ON "HIERARCHY"."ID" = 
> "PROXIES"."TARGETID" LEFT JOIN "MISC" ON "HIERARCHY"."ID" = "MISC"."ID" LEFT 
> JOIN "DUBLINCORE" ON "HIERARCHY"."ID" = "DUBLINCORE"."ID" LEFT JOIN 
> "VERSIONS" ON "_H"."ID" = "VERSIONS"."ID" WHERE "HIERARCHY"."PRIMARYTYPE" IN 
> (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND ("_H"."PARENTID" = ?) AND 
> ("VERSIONS"."ID" IS NULL) AND ("MISC"."LIFECYCLESTATE" <> ?)) ORDER BY "_C2", 
> "_C3" [42122-114]
> Same error is thrown with "ORDER BY dc:title, dc:title DESC" but maybe we can 
> consider this invalid (?)

-- 
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