Andrus Adamchik updated CAY-929:
--------------------------------
Description:
Currently select translator generates JOIN syntax in an old fashion way - adds all participating tables to the FROM clause of the query, adds join conditions to the WHERE clause. Among other things this limits us to only INNER JOINS on almost all DB's (except for maybe Oracle). Will need to change the translator to generate modern cross-db explicit join syntax that places all tables and conditions in the FROM clause. E.g.:
Old: SELECT ... FROM ARTIST t0, PAINTING t1 WHERE t0.ARTIST_ID = t1.ARTIST_ID
New: SELECT ... FROM ARTIST t0 JOIN PAINTING t1 ON (t0.ARTIST_ID = t1.ARTIST_ID)
Things to consider:
* Check all DbAdapters to see if some override the join generation methods and therefore need to be updated
* This feature does not change the fact that SelectQuery itself still will not support explicit outer joins in the qualifier
* Still the new API for joins should allow callers to specify what kind of join they want (so that we could use it in prefetches down the line)
was:appendTable() in SelectTranslator.java simply appends a list of all tables referenced to the FROM clause. In some cases these tables should instead be added as a join (often a left join). This code needs to allow for that possibility. I can see some trivial ways to do this by hacking this code, but I am not confident of how this might fit into the grand plan of EJBQL and more. Will this code need to accommodate other more complex joins in the future (eg is there ever a need for outer joins?)
Affects Version/s: 3.0
Summary: SelectTranslator support for standard SQL join syntax, including outer joins (was: SelectTranslator needs to support left join)
Changing a description of this Jira to reflect the changes that need to be done in Cayenne
> SelectTranslator support for standard SQL join syntax, including outer joins
> ----------------------------------------------------------------------------
>
> Key: CAY-929
> URL: https://issues.apache.org/cayenne/browse/CAY-929
> Project: Cayenne
> Issue Type: Improvement
> Components: Cayenne Core Library
> Affects Versions: 3.0
> Reporter: Ari Maniatis
> Assignee: Andrus Adamchik
>
> Currently select translator generates JOIN syntax in an old fashion way - adds all participating tables to the FROM clause of the query, adds join conditions to the WHERE clause. Among other things this limits us to only INNER JOINS on almost all DB's (except for maybe Oracle). Will need to change the translator to generate modern cross-db explicit join syntax that places all tables and conditions in the FROM clause. E.g.:
> Old: SELECT ... FROM ARTIST t0, PAINTING t1 WHERE t0.ARTIST_ID = t1.ARTIST_ID
> New: SELECT ... FROM ARTIST t0 JOIN PAINTING t1 ON (t0.ARTIST_ID = t1.ARTIST_ID)
> Things to consider:
> * Check all DbAdapters to see if some override the join generation methods and therefore need to be updated
> * This feature does not change the fact that SelectQuery itself still will not support explicit outer joins in the qualifier
> * Still the new API for joins should allow callers to specify what kind of join they want (so that we could use it in prefetches down the line)
>
-- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
This archive was generated by hypermail 2.0.0 : Fri Dec 07 2007 - 07:27:14 EST