[
https://jira.nuxeo.org/browse/NXP-5495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=80073#action_80073
]
Florent Guillaume commented on NXP-5495:
----------------------------------------
Oracle cannot have column aliases in GROUP BY either:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2080424
The alias can be used in the order_by_clause but not other clauses in the
query.
> SQL Server and Oracle fail to navigate by tags
> ----------------------------------------------
>
> Key: NXP-5495
> URL: https://jira.nuxeo.org/browse/NXP-5495
> Project: Nuxeo Enterprise Platform
> Issue Type: Bug
> Components: Core SQL Storage, Tagging
> Affects Versions: 5.3.2
> Reporter: Florent Guillaume
> Assignee: Florent Guillaume
> Priority: Major
> Fix For: 5.4
>
>
> When navigating by tag using SQL Server or Oracle we get this error:
> SQL Server:
> TRACE [JDBCMapperLogger] (3) SQL: SELECT [tag].[label] AS [_C1],
> COUNT(DISTINCT [relation].[source]) AS [_C2] FROM [hierarchy] LEFT JOIN
> [relation] ON [hierarchy].[id] = [relation].[id] LEFT JOIN [tag] ON
> [relation].[target] = [tag].[id] WHERE [hierarchy].[primarytype] IN
> ('Tagging') GROUP BY [_C1]
> ERROR [viewhandler] ... Invalid query: NXTAG: COUNTSOURCE: SELECT
> tag:label, relation:source FROM Tagging
> Caused by: java.sql.SQLException. message: Invalid column name '_C1'.
> Oracle:
> TRACE [JDBCMapperLogger] (17) SQL: SELECT "TAG"."LABEL" AS "_C1",
> COUNT(DISTINCT "RELATION"."SOURCE") AS "_C2" FROM "HIERARCHY", "RELATION",
> "TAG" WHERE "HIERARCHY"."ID" = "RELATION"."ID"(+) AND "RELATION"."TARGET" =
> "TAG"."ID"(+) AND "HIERARCHY"."PRIMARYTYPE" IN ('Tagging') GROUP BY "_C1"
> Invalid query: NXTAG: COUNTSOURCE: SELECT tag:label, relation:source FROM
> Tagging
> Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception:
> java.sql.SQLException. message: ORA-00904: "_C1": invalid identifier
--
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