#28899: recursive relationship only works one way
-------------------------------------+-------------------------------------
               Reporter:  HenrySiau  |          Owner:  nobody
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Database   |        Version:  2.0
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:  ForeignKey, self
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 {{{
 class Catalog(models.Model):
     parent = models.ForeignKey('self',related_name='children',
 on_delete=models.CASCADE, null=True, blank=True)


 }}}

 Catalog.parent always return null, while Catalog.children.all() works
 fine.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28899>
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/052.4ed6d24ffe3a3e81b1d8cf33055ebf97%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to