change limit/offset with select related to be applied on a subquery and limit only main model query
This commit is contained in:
@ -266,7 +266,7 @@ async def test_prefetch_related_with_select_related():
|
||||
await Album.objects.select_related(["tracks", "shops"])
|
||||
.filter(name="Malibu")
|
||||
.prefetch_related(["cover_pictures", "shops__division"])
|
||||
.get()
|
||||
.first()
|
||||
)
|
||||
|
||||
assert len(album.tracks) == 0
|
||||
|
||||
Reference in New Issue
Block a user