-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Take a schema like youtube where there are users and videos, in the past eager loading when doing a query like Videos(Load("User")) would create something that would look like this: SELECT * FROM "users" WHERE "id" IN ($1,$2,$3,$4,$5,$6,$7); [1 1 1 1 1 2 2] Now we de-duplicate the IDs of the eager loaded relationships, so even though there are 7 videos, they only refer to 2 users so we only look up those two. SELECT * FROM "videos"; [] SELECT * FROM "users" WHERE "id" IN ($1,$2); [1 2] - Fix #267
- Loading branch information
Showing
3 changed files
with
48 additions
and
18 deletions.
There are no files selected for viewing
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
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
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