Merge pull request #771 from caponica/cqb-indexby
Added indexBy option to createQueryBuilder
This commit is contained in:
commit
fc7719d5fa
@ -75,14 +75,15 @@ class EntityRepository implements ObjectRepository, Selectable
|
||||
* Creates a new QueryBuilder instance that is prepopulated for this entity name.
|
||||
*
|
||||
* @param string $alias
|
||||
* @param string $indexBy The index for the from.
|
||||
*
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
public function createQueryBuilder($alias)
|
||||
public function createQueryBuilder($alias, $indexBy = null)
|
||||
{
|
||||
return $this->_em->createQueryBuilder()
|
||||
->select($alias)
|
||||
->from($this->_entityName, $alias);
|
||||
->from($this->_entityName, $alias, $indexBy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user