You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Vandahl (Created) (JIRA)" <ji...@apache.org> on 2012/03/13 13:49:37 UTC
[jira] [Created] (TORQUE-187) Allow joins with subselects in the
FROM clause
Allow joins with subselects in the FROM clause
----------------------------------------------
Key: TORQUE-187
URL: https://issues.apache.org/jira/browse/TORQUE-187
Project: Torque
Issue Type: New Feature
Components: Runtime
Affects Versions: 4.0
Reporter: Thomas Vandahl
It shall be possible to execute statements like
{code:sql}
SELECT * FROM table1, (SELECT * FROM table2 WHERE xxx) t2 WHERE table1.id = t2.id
{code}
(I know this example can be rewritten as a simple join, the actual use case is more complicated)
In the case of the Criteria object, this would suggest a call sequence like
{code}
criteria.addAlias("t2", subCriteria);
criteria.addJoin("t2.id", Table1Peer.ID);
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] [Closed] (TORQUE-187) Allow joins with subselects in the
FROM clause
Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Fox closed TORQUE-187.
-----------------------------
> Allow joins with subselects in the FROM clause
> ----------------------------------------------
>
> Key: TORQUE-187
> URL: https://issues.apache.org/jira/browse/TORQUE-187
> Project: Torque
> Issue Type: New Feature
> Components: Runtime
> Affects Versions: 4.0-beta1
> Reporter: Thomas Vandahl
> Assignee: Thomas Fox
> Fix For: 4.0-beta1
>
>
> It shall be possible to execute statements like
> SELECT * FROM table1, (SELECT * FROM table2 WHERE xxx) t2 WHERE table1.id = t2.id
> (I know this example can be rewritten as a simple join, the actual use case is more complicated)
> In the case of the Criteria object, this would suggest a call sequence like
> criteria.addAlias("t2", subCriteria);
> criteria.addJoin("t2.id", Table1Peer.ID);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] [Updated] (TORQUE-187) Allow joins with subselects in the
FROM clause
Posted by "Thomas Vandahl (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Vandahl updated TORQUE-187:
----------------------------------
Description:
It shall be possible to execute statements like
SELECT * FROM table1, (SELECT * FROM table2 WHERE xxx) t2 WHERE table1.id = t2.id
(I know this example can be rewritten as a simple join, the actual use case is more complicated)
In the case of the Criteria object, this would suggest a call sequence like
criteria.addAlias("t2", subCriteria);
criteria.addJoin("t2.id", Table1Peer.ID);
was:
It shall be possible to execute statements like
{code:sql}
SELECT * FROM table1, (SELECT * FROM table2 WHERE xxx) t2 WHERE table1.id = t2.id
{code}
(I know this example can be rewritten as a simple join, the actual use case is more complicated)
In the case of the Criteria object, this would suggest a call sequence like
{code}
criteria.addAlias("t2", subCriteria);
criteria.addJoin("t2.id", Table1Peer.ID);
{code}
> Allow joins with subselects in the FROM clause
> ----------------------------------------------
>
> Key: TORQUE-187
> URL: https://issues.apache.org/jira/browse/TORQUE-187
> Project: Torque
> Issue Type: New Feature
> Components: Runtime
> Affects Versions: 4.0
> Reporter: Thomas Vandahl
>
> It shall be possible to execute statements like
> SELECT * FROM table1, (SELECT * FROM table2 WHERE xxx) t2 WHERE table1.id = t2.id
> (I know this example can be rewritten as a simple join, the actual use case is more complicated)
> In the case of the Criteria object, this would suggest a call sequence like
> criteria.addAlias("t2", subCriteria);
> criteria.addJoin("t2.id", Table1Peer.ID);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] [Resolved] (TORQUE-187) Allow joins with subselects in the
FROM clause
Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Fox resolved TORQUE-187.
-------------------------------
Resolution: Fixed
Fix Version/s: 4.0
Assignee: Thomas Fox
see org.apache.torque.generated.peer.JoinTest.testImplicitInnerJoinWithSubselect() in the test project for a test case
> Allow joins with subselects in the FROM clause
> ----------------------------------------------
>
> Key: TORQUE-187
> URL: https://issues.apache.org/jira/browse/TORQUE-187
> Project: Torque
> Issue Type: New Feature
> Components: Runtime
> Affects Versions: 4.0
> Reporter: Thomas Vandahl
> Assignee: Thomas Fox
> Fix For: 4.0
>
>
> It shall be possible to execute statements like
> SELECT * FROM table1, (SELECT * FROM table2 WHERE xxx) t2 WHERE table1.id = t2.id
> (I know this example can be rewritten as a simple join, the actual use case is more complicated)
> In the case of the Criteria object, this would suggest a call sequence like
> criteria.addAlias("t2", subCriteria);
> criteria.addJoin("t2.id", Table1Peer.ID);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org