#19385: Add support for multiple-column join
-------------------------------------+-------------------------------------
     Reporter:  cseibert             |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  join                 |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by akaariai):

 The names_to_path_to_fields stuff is in master now.

 I think the next step is the possibility to have multiple columns per
 join, then try to fix all the possible places which break under
 multicolumn joins in the ORM. Here is a partial list:
   - IN lookups
   - What other lookups to support and how to do this
   - Subquery support (we should use EXISTS instead of IN subqueries)
   - Join trimming
   - Representation of the foreign key in the model's _meta.

 I am sure I am missing half of the complications.

 I think we will want to abandon the get_join_clause() approach. This means
 there will be too little information available in the ORM, and we would
 need to move stuff like "can we trim this join" into fields which doesn't
 seem right. However, we will likely want to support the case of _no_ join
 columns, so that one can generate the whole clause in the
 field.get_extra_join_sql(). (Also, we might want to reconsider the name
 AND implementation of the get_extra_join_sql() method before 1.6...)

 It seems the work done in
 https://github.com/jtillman/django/compare/ticket_19385 is a good basis
 for doing further work on the ORM changes. We should also see what
 koniiiik has done so that we won't be duplicating or invalidating his work
 here.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19385#comment:18>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to