#28297: Same queryset result in two different queries on ORM
-------------------------------------+-------------------------------------
     Reporter:  Marcus Renno         |                    Owner:  Marcus
                                     |  Renno
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  1.11
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  join, annotation, F  |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Marcus Renno):

 Replying to [comment:31 holvianssi]:
 > To me it seems that pre
 
https://code.djangoproject.com/changeset/ab89414f40db1598364a7fe4cfac1766cacd2668
 we always used the *first* join, not the last join possible in join(). I
 believe this has been that way for a long time, so changing that should be
 considered carefully.
 >
 > I'm not exactly sure why do we get random order for self.alias_map in
 join. It's an OrderedDict, so that shouldn't be the case...

 Hm... I always had the impression it was the last join. For me, it makes
 sense to use the tables in sequence, because  you use actions (aka
 operations) in sequence. If it always grab the first joined table this
 wouldn't be possible. From what I understood, here in this ticket, until
 recent changes the order was random.

--
Ticket URL: <https://code.djangoproject.com/ticket/28297#comment:32>
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.56ae9ca7d9c8e0ee58371c243b8575a4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to