Last active
August 25, 2020 06:18
-
-
Save velotiotech/2b2ab3bc53243fffc7b1df021158aff9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> queryset = Book.objects.select_related("author").all() | |
>> print(queryset.query) | |
SELECT "core_book"."id", | |
"core_book"."name", | |
"core_book"."author_id", | |
"core_book"."created_at", | |
"core_author"."id", | |
"core_author"."name" | |
FROM "core_book" | |
INNER JOIN "core_author" ON ("core_book"."author_id" = "core_author"."id") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment