lox/pheasant — pull request #96 by lox (2013-12-23 05:29:36+00:00)
Title: Support for joins on a Collection for filtering

A common frustration I have with Pheasant is it's lack of ability for easy joins at a Collection level, making it very hard to filter a collection by some sub-relationship.

This pull request implements collection-level joins.

```php
join(array('Author'))->filter('Author.isadmin =1');

// find posts where the author has a specific interest
$posts = Post::all()->join(array('Author'=>array('Interests')))->filter('Interests.key = "Llama Herding"');
```

The above are implemented with a combination of joins and groupBy clauses.