Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0
-
None
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)