#31591: Spanning relationship backwards when related_name is used.
-------------------------------------+-------------------------------------
               Reporter:  Nat S      |          Owner:  nobody
  Dunn                               |
                   Type:             |         Status:  new
  Cleanup/optimization               |
              Component:             |        Version:  3.0
  Documentation                      |
               Severity:  Normal     |       Keywords:  related_name
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Under https://docs.djangoproject.com/en/3.0/topics/db/queries/#lookups-
 that-span-relationships, the documentation says:

 It works backwards, too. To refer to a “reverse” relationship, **use the
 lowercase name of the model**.

 This works only if the name of that relationship hasn't been changed with
 **related_name**.

 I suggest updating the doc to read:

 It works backwards, too. To refer to a “reverse” relationship, use the
 lowercase name of the model**, unless you have used related_name to
 override the name of the relationship, in which case you should use the
 related_name you have set.**

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31591>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.d491e6c9e3ecdcb4e7adbfbed98b7537%40djangoproject.com.

Reply via email to