#35580: System check fields.E300 does not allow for related fields involving
auto_created through models.
-------------------------------------+-------------------------------------
     Reporter:  brucejwb             |                     Type:  Bug
       Status:  new                  |                Component:  Database
                                     |  layer (models, ORM)
      Version:  5.1                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 The model system checks will raise the fields.E300 error if you make an
 auto_created through model the target of a related field. Here is an
 example of models that will trigger this error:


 {{{
 class E300TestModelA(models.Model):
     pass

 class E300TestModelB(models.Model):
     many_to_many_rel = models.ManyToManyField(E300TestModelA)

 class E300TestModelC(models.Model):
     one_to_one_rel =
 models.OneToOneField("check_framework.E300TestModelB_many_to_many_rel",
 on_delete=models.CASCADE)
 }}}


 I realize this might be an unusual thing to do, however I have a use case
 that requires this and thought I would create this ticket in case others
 agree that this should be changed. I will create a pull request shortly.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35580>
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/01070190845cfbfe-adc80406-3d0d-45e2-8e70-cba1ee3ffd3a-000000%40eu-central-1.amazonses.com.

Reply via email to