1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

queryset-refactor: When using select_related() with an explicit foreign key,

use the right join type if the FK is nullable. Fixed #6981.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2008-04-13 04:42:08 +00:00
parent ed23f00a00
commit 01b7a16ef0
2 changed files with 8 additions and 2 deletions

View File

@@ -561,6 +561,10 @@ Multiple filter statements are joined using "AND" all the time.
>>> Author.objects.filter(Q(extra__note=n1)|Q(item__note=n3)).filter(id=a1.id)
[<Author: a1>]
Bug #6981
>>> Tag.objects.select_related('parent').order_by('name')
[<Tag: t1>, <Tag: t2>, <Tag: t3>, <Tag: t4>, <Tag: t5>]
Bug #6180, #6203
>>> Item.objects.count()
4