Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2024-05-14 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by ontowhee):

 * owner:  ontowhee => (none)
 * status:  assigned => new

-- 
Ticket URL: 
Django 
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/0107018f7724f3ca-e670aba9-b918-417c-8c9c-71f975e97177-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2024-04-20 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  ontowhee
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by ontowhee):

 Replying to [comment:10 David Sanders]:

 Thanks for the simple example!

 I'm not too knowledgeable about the ORM, but I'm trying to work through
 this problem. Is the problem within annotate, or somewhere else, or a
 combination of annotate and something else?

 Using the simple example, I tried taking the union of Foo and Bar without
 any annotation, and I apply `.values('name')` to the result


 {{{
 Foo.objects.create(name='hello')
 Bar.objects.create(name='goodbye')

 qs = Foo.objects.all().union(Bar.objects.all())
 print(qs)
 }}}

 and it gives

 {{{
 
 }}}

 Which is correct and expected. However, when I remove `.values('name')`

 {{{
 qs = Foo.objects.all().union(Bar.objects.all())
 print(qs)
 }}}

 it then gives

 {{{
 , ]>
 }}}

 Is this expected, or is this something to look into?
-- 
Ticket URL: 
Django 
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/0107018efc527c8b-b9b4991f-081d-49d0-ac71-1392515e8086-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2024-03-22 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  ontowhee
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sylvain Fankhauser):

 * cc: Sylvain Fankhauser (added)

-- 
Ticket URL: 
Django 
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/0107018e66ad63c5-fba5eec3-2157-43ce-8d48-42330c505c19-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2024-03-11 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  ontowhee
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dan LaManna):

 * cc: Dan LaManna (added)

-- 
Ticket URL: 
Django 
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/0107018e2e7a980d-5e905799-1ab5-4a8e-b757-77573cc0fe63-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2024-02-15 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  ontowhee
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by ontowhee):

 * owner:  (none) => ontowhee
 * status:  new => assigned

-- 
Ticket URL: 
Django 
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/0107018dacfb8402-7dd09aa0-2e73-4676-a416-45e6e79b3137-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2023-11-05 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tom Carrick):

 * cc: Tom Carrick (added)


-- 
Ticket URL: 
Django 
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/0107018ba09b622c-042cd2ff-37ae-4178-b331-0195c98dd6bd-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2023-11-05 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Sanders):

 * cc: David Sanders (added)


Comment:

 If it helps, while checking if #34945 was a duplicate of this I was able
 to boil down the failure to this simple example:

 {{{
 class Foo(Model):
 name = CharField()

 class Bar(Model):
 name = CharField()

 qs = (
 Foo.objects.annotate(alias=F("name"))
 .union(Bar.objects.annotate(alias=F("name")))
 .values("alias")
 )
 print(qs)
 }}}

 gives

 {{{
 
 }}}

-- 
Ticket URL: 
Django 
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/0107018ba03184f9-1dea6a59-7b25-4b63-be82-727c6218e1a4-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2023-10-02 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sergey Fedoseev):

 * cc: Sergey Fedoseev (removed)


-- 
Ticket URL: 
Django 
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/0107018af3f806f1-e3277f45-8746-427a-b515-c0ad06885ee8-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2023-10-01 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Wobrock):

 * owner:  David Wobrock => (none)
 * status:  assigned => new


Comment:

 I didn't find the time to push on this. Removing myself from the ticket.

-- 
Ticket URL: 
Django 
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/0107018aebf19b06-4a14b83d-f476-4ffc-b7d1-36289abe01b4-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2023-03-24 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Wobrock):

 * owner:  nobody => David Wobrock
 * status:  new => assigned


-- 
Ticket URL: 
Django 
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/01070187126e6eeb-1d9c65b6-64ea-427e-bfbc-a0669d55ffbc-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation. (was: QuerySet.values() and values_list() for union(), difference(), and intersection() queries fai

2023-03-23 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * cc: David Wobrock (added)
 * status:  closed => new
 * resolution:  duplicate =>
 * stage:  Unreviewed => Accepted


Comment:

 We [https://github.com/django/django/pull/16649#issuecomment-1481387207
 decided] to treat it as a separate issue.

-- 
Ticket URL: 
Django 
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/0107018711ff9952-6cfd7f7d-0353-40a1-9aee-71ffe24d72fe-00%40eu-central-1.amazonses.com.