#29545: Nested OuterRef not looking on the right model for the field.
     Reporter:  Aaron Lisman         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  2.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  outerref, subquery   |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0

Comment (by Oskar Persson):

 I also ran into this just now and can confirm that the bug exists in both
 2.2.4 and master, tested with the models in tests/queries/models.py:

 def test_nested_outerref(self):
     from .models import Item, Node, Number


     qs = Number.objects.annotate(

 This results in the following exception

 django.core.exceptions.FieldError: Cannot resolve keyword 'num' into
 field. Choices are: cover, created,
 creator, creator_id, has_tag, id, modified, name, note, note_id, tags

Ticket URL: <https://code.djangoproject.com/ticket/29545#comment:4>
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 

Reply via email to