#35830: Queryset Union doesn't persist column names
-------------------------------------+-------------------------------------
     Reporter:  Paul Landon Tuckett  |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  orm, database,       |             Triage Stage:
  queryset, union, sql               |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Paul Landon Tuckett):

 I totally understand that column references can be ambiguous, but we
 convert these Django queries into SQL and inject them into raw sql, so
 it's a major overhaul for us to have to convert all the Django queries to
 raw sql because of this change. We do use `values` and/or `values_list`,
 but it still doesn't preserve the column names. Even with an `order_by`
 and `values` combination, same result. If there is another way we can
 force the Django ORM to preserver these column names, please advise.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35830#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 
https://groups.google.com/d/msgid/django-updates/010701927ea8d0fa-1208698b-63fd-437b-a504-90c0fb68fae1-000000%40eu-central-1.amazonses.com.

Reply via email to