Changes between Initial Version and Version 1 of Ticket #25064


Ignore:
Timestamp:
Jul 5, 2015, 9:53:42 PM (9 years ago)
Author:
Alex Hill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25064

    • Property Summary Allow get_joining_columns to return empty tupleJoin.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple
  • Ticket #25064 – Description

    initial v1  
    1 If you override `get_joining_columns()` to return an empty tuple but provide extra conditions with `extra_join_restrictions()` , `Join.as_sql()` creates invalid SQL.
     1`Join.as_sql()` gets its join conditions from two places: the `get_joining_columns()` and `get_extra_restrictions()`.
     2
     3The SQL for extra restrictions is unconditionally prefixed with `AND`, which means invalid SQL is emitted if no joining columns are specified. The fix to make the `AND` conditional is a one-liner and allows users to override the default join conditions instead of adding to them.
Back to Top