Skip to content

Instantly share code, notes, and snippets.

@KendallHopkins
Created June 23, 2010 21:34
Show Gist options
  • Save KendallHopkins/450591 to your computer and use it in GitHub Desktop.
Save KendallHopkins/450591 to your computer and use it in GitHub Desktop.
$review = ReviewQuery::create()
->joinWith('Review.Book')
->joinWith('Book.Author')
->joinWith('Book.Publisher')
->findOne();
$book = $review->getBook() // No additional query needed
$author = $book->getAuthor(); // No additional query needed
$publisher = $book->getPublisher(); // No additional query needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment