KnpLabs/KnpRadBundle — pull request #102 by PedroTroller (2013-06-06 13:40:39+00:00)
Title: Make repositories smarter

Hi dudes !

Just a little proposition from @Djeg and me about the entity repositories.

Why not try to make the repository smarter by include the limit in the method call string ?

For exemple, if I want my 15 latests actives orders, I just have to call
```php
$this->getRepository('App:Order')->find15Actives()
```
The repository :
```php
class OrderRepository extends EntityRepository
{
protected class buildActive()
{
return $this->buildAll()->andWhere($this->getAlias() . '.active = 1');
}
}