nette/nette — pull request #1436 by simara-esports (2014-03-05 13:03:43+00:00)
Title: Database: Condition can be written to the LEFT JOIN using Selection::left()

There is a one thing that we are missing, and it's a left join support in selection.
This pull request is just a draft, but it is quite importat for us (not this code, but function).

Common situation: You have a product (book) and it's price in another table (product_price). Price can be active or inactive (historical price). When product doesn't have active price, and you are selecting books it's prices, you need left join if you want to see all books.

So, we would like to call:
$db->table('book')
->select('book.*, :product_price.value')
->left(':product_price.active', 1);