#33792: Using QuerySet.extra works while RawSQL inside annotate fails
-------------------------------------+-------------------------------------
Reporter: Shane Ambler | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: QuerySet.extra | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => invalid
Comment:
Thanks for this report, however it's an issue in your code not in Django
itself. It works with empty `params` (instead of a blank string):
{{{
num_order=RawSQL('''cast(substring(title from '^([0-9]{1,10})') as
integer)''', params=())).order_by('num_order','title')
}}}
Please use one of
[https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
support channels] if you have further questions.
--
Ticket URL: <https://code.djangoproject.com/ticket/33792#comment:1>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070181804006a5-5bc97f9f-4a45-4033-8cf8-7b28e81a7f15-000000%40eu-central-1.amazonses.com.