db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fox (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TORQUE-320) GroupBy adds columns to the select clause
Date Sun, 27 Jul 2014 13:25:38 GMT

    [ https://issues.apache.org/jira/browse/TORQUE-320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14075622#comment-14075622
] 

Thomas Fox commented on TORQUE-320:
-----------------------------------

I am not in favour of having different funtionality for different databases. Torque has always
tried to provide the same functionality for different databases.

To illustrate the problem:
Usually additional select columns are not much of a problem, but with a subselect this is
different. For example, to retain only one book per author, one would write:
"DELETE FROM BOOK WHERE BOOK_ID NOT IN (SELECT MIN(BOOK_ID) FROM BOOK GROUP BY AUTHOR_ID)");
This is a perfectly valid query in oracle, and I cannot create it with the current Criteria
API so I have to resort to String query creation :-(



> GroupBy adds columns to the select clause
> -----------------------------------------
>
>                 Key: TORQUE-320
>                 URL: https://issues.apache.org/jira/browse/TORQUE-320
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime
>    Affects Versions: 4.0
>            Reporter: Thomas Fox
>
> If I create a Criteria, define the select columns manually and then add groupBy Columns,
SqlBuilder adds the groupBy Columns to the select columns
> One should be able to create GROUP BY Queries without adding the columns to the select
clause



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message