#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 | -------------------------------------+------------------------------------- Changes (by akaariai):
* needs_better_patch: 0 => 1 Comment: Now with basic select_related and order_by support. The field <-> ORM interface contains a bit more stuff if you want to support select_related(), but it isn't huge by any standard: - four attributes: model, null, unique, name - get_path_info() and get_join_sql() as described in above comments - select_related_descent() - should this field be descended into? Parameters contain info about what is requested. - get_cache_name() and get_related_cache_name() - when doing select_related fetches to what attribute should the fetched value be saved. However, I had to do a lot of hackery to fake model._meta support in tests. So, model._meta refactor would be needed next. Note that the goal is not to make the Field <-> ORM interface public anytime soon. I am afraid making it stable would make it hard to do further work on the ORM. As for `IN` support etc - it seems there could be some hard problems awaiting in that path regarding partially NULL composite values and so on. I think polishing the current work and then pushing the work to master could be a good plan... But, enough of this ticket for now, time to concentrate on other issues for a while. -- Ticket URL: <https://code.djangoproject.com/ticket/19385#comment:9> 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.