-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
queryset.extra(order_by=[added_column]) doesn't work #3
Comments
Hi michiya, |
The problem will be resolved by updating the backend to the new version (1.0.8). Let me know if you still have the same problem with the new one. |
Thanks, From: Michiya Takahashi [mailto:notifications@github.com] — |
Michiya, Healarium want to share a small thank you From: Michiya Takahashi [mailto:notifications@github.com] — |
Thank you for your kindness, and just knowing that you care is enough for me. Let me know if you find other bugs. |
Hi Michiya, I don't know how to reach you otherwise -- wanted to call your attention to https://code.djangoproject.com/wiki/SummerOfCode2014#Improvingthelesspopulardatabasebackends, and invite you to add points to the idea and consider mentoring or co-mentoring a student (of course, only if you're interested). Have fun, and thanks for your work on this project, Shai. |
Hi,
Take this little snippet. User is
django.contrib.auth.models.User
(I tried it on Django 1.4):According to documentation, this should order the users by their last name, lowercased. It works as advertised on Oracle and Sqlite, but on SQL Server with current django-pyodbc-azure it explodes with
It seems that the reason is that the added names are treated as if they were regular columns, which doesn't work with SQL Server. The generated query is:
Note that things become even worse when slicing is involved:
Also, it appears that taking the order_by out to a separate
extra
call changes nothing.The text was updated successfully, but these errors were encountered: