Skip to content

Commit

Permalink
Readme: fix queries count used for tags (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal authored Oct 15, 2024
1 parent fee4037 commit 225ff12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $categories = $entityManager->getRepository(Category::class)->findAll();

$preloader = new EntityPreloader($entityManager);
$articles = $preloader->preload($categories, 'articles'); // 1 query to preload articles
$preloader->preload($articles, 'tags'); // 1 query to preload tags
$preloader->preload($articles, 'tags'); // 2 queries to preload tags
$preloader->preload($articles, 'comments'); // 1 query to preload comments

// no more queries are needed now
Expand Down

0 comments on commit 225ff12

Please sign in to comment.