#33999: Efficient filter with join on soft link.
-------------------------------------+-------------------------------------
     Reporter:  brandic              |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  3.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  QuerySet.extra       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => wontfix
 * type:  Cleanup/optimization => New feature
 * component:  Uncategorized => Database layer (models, ORM)


Comment:

 As far as I'm aware, using `extra()` is the right thing to do in your
 case. You could also try to change `ModelB.c` to a `ForeignKey` without a
 database constraint, e.g.
 {{{
 c = models.ForeignKey(ModelC, ..., db_constraint=False)
 }}}
 but it's a bad idea in most of cases (see
 
[https://docs.djangoproject.com/en/stable/ref/models/fields/#django.db.models.ForeignKey.db_constraint
 docs]).

 Even if it's feasible I don't think there would be consensus to add that
 complexity to Django itself. You can raise the idea on the
 DevelopersMailingList to reach a wider audience and see what other think
 (see also [https://docs.djangoproject.com/en/stable/internals/contributing
 /bugs-and-features/#requesting-features the guidelines with regards to
 requesting features]).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33999#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018321b550a3-4084550b-6940-497d-b277-4dd10b71704a-000000%40eu-central-1.amazonses.com.

Reply via email to