[
https://issues.apache.org/jira/browse/TORQUE-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493919
]
Thomas Fischer commented on TORQUE-89:
--------------------------------------
I did not understand that the change in processOrderBy was the main point. I
was under the impression that you needed both changes for your query to work.
I have made the requested change to processOrderBy. Could you please check
whether this works as you expected ?
The change in removeSQLFunction will not be made, instead the problem will be
resolved by improved column definitions after 3.3.
> OrderByColumn for COUNT, SUM
> ----------------------------
>
> Key: TORQUE-89
> URL: https://issues.apache.org/jira/browse/TORQUE-89
> Project: Torque
> Issue Type: Bug
> Components: Runtime
> Affects Versions: 3.3-RC2
> Environment: Linux
> Reporter: Stefan Birrer
>
> I've a "complicated" JOIN statement that features some custom column like
> "COUNT(a) AS ca".
> Torque runtime fails on the
> Criteria::addAscendingOrderByColumn("ca")
> because it expects a full qualified table.columnName which is not the case
> for the example "ca" column.
> The problem can be fixed by adapting the following functions (3.3-RC2):
> src/java/org/apache/torque/util/SQLBuilder.java
> removeSQLFunction(final String name) : name must not necessarily contain '.'
> or '*" thus replacing the first thrown exception with a "return name" fixes
> that issue
> processOrderBy(...) : in the for loop, strippedColumnName must not contain
> '.' hence replacing the first thrown exception with
> "orderByColumn.add(orderByColumn); break;" fixes the issue
> This are quick fixes and I guess you want to reconsider whether you want to
> implement it that way. After these two changes, it was working correctly
> though.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]