#14891: use_for_related_fields=False is not honored by reverse FK or M2M related
managers
-------------------------------------+-------------------------------------
     Reporter:  sdksho@…             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  Manager              |             Triage Stage:  Accepted
  ManyToManyField                    |
  use_for_related_fields             |
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by loic):

 [https://github.com/django/django/pull/6175#issuecomment-219451336 PR6175]
 deprecates `use_for_related_fields`. "to-one" relations go through
 `_base_manager` which can be specified with the `base_manager_name` model
 option and "to-many" relations go through `_default_manager` which can be
 specified with the `default_manager_name` model option.

 We tried to add a blanket "use for every relations" manager in the form of
 `related_manager_name` but
 [https://github.com/django/django/pull/6175#issuecomment-210315119
 eventually decided against]. For finer control over relation managers, I
 think comment:27 is the way to go but this is a new feature which deserves
 a ticket of its own.

--
Ticket URL: <https://code.djangoproject.com/ticket/14891#comment:29>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.b1b9ae4f647d5d1730c5981bb8df62d7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to