#29416: Undesired subquery added to the GROUP BY clause
-------------------------------------+-------------------------------------
Reporter: Antoine Pinsard | Owner: felixxm
Type: Bug | Status: assigned
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: groupby, subquery | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Antoine Pinsard):
OK, FYI I was able to workaround the issue:
{{{
>>> nb_reports = RawSQL("SELECT COUNT(*) FROM pro_moderation WHERE
objType='sponsor' AND objId=ala_sponsor.sponId AND state=2", [])
>>> nb_reports.alias = 'nb_reports'
>>> nb_reports.target = type('bare', (object,), {'primary_key': True})
}}}
So I will be able to upgrade to 2.0 meanwhile.
--
Ticket URL: <https://code.djangoproject.com/ticket/29416#comment:8>
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/066.449193faf4881daa239fb5d8282f7f31%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.