public function createQueryBuilder($alias)
    {
        $qb = $this->dm->createQueryBuilder();
        $qb->from($alias)->document($this->className, $alias);

        return $qb;
    }
public function createQueryBuilder($alias)
    {
        $qb = $this->dm->createQueryBuilder();
        $qb->from($alias)->document($this->className, $alias);

        return $qb;
    }
public function createQueryBuilder ( $ alias ) { $ qb = $ this -> dm -> createQueryBuilder ( ) ; $ qb -> from ( $ alias ) -> document ( $ this -> className , $ alias ) ; return $ qb ; }
Create a QueryBuilder that is pre-populated for this repositories document.

The returned query builder will be pre-populated with the criteria
required to search for this repositories document class.

NOTE: When adding criteria to the query builder you should
use ->andWhere(...) as ->where(...) will overwrite
the class criteria.

@param string $alias name of the alias to use, defaults to 'a'

@return QueryBuilder
Create a QueryBuilder that is pre - populated for this repositories document .