We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
requires stable and unique names for annotations.
The text was updated successfully, but these errors were encountered:
For example: Doing <<queryset with join>>.order_by('title_i18n').distict('title_i18n') doesn't work, because distinct arguments are not rewritten.
<<queryset with join>>.order_by('title_i18n').distict('title_i18n')
Possible workaround is
<<queryset with join>> .annotate(title_order=models.functions.Cast('title_i18n', output_field=models.CharField(255))) .order_by('title_order') .distinct('title_order')
but it's better to avoid it.
Sorry, something went wrong.
Test case: English works, but dutch fails with: ProgrammingError: SELECT DISTINCT ON expressions must match initial ORDER BY expressions.
ProgrammingError: SELECT DISTINCT ON expressions must match initial ORDER BY expressions.
with override('en'): qs = Blog.objects.filter(category__name_i18n='Birds').order_by('title_i18n').distinct('title') self.assertEqual(key(qs, 'title_i18n', sep=' '), 'Falcon Vulture') with override('nl'): qs = Blog.objects.filter(category__name_i18n='Vogels').order_by('title_i18n').distinct('title_i18n') self.assertEqual(key(qs, 'title_i18n', sep=' '), 'Valk Gier')
Add (skipped&failing) test for #27
e872887
No branches or pull requests
requires stable and unique names for annotations.
The text was updated successfully, but these errors were encountered: