Repository

php app/console doctrine:generate:entities UserBundle --no-backup

php app/console doctrine:schema:update --force

php app/console doctrine:fixtures:load
Query Builder

Get Repository Method

 = ->getRepository('UserBundle:User');

var_dump($userRepo->findOneByUsernameOrEmail(wayne@deathstar.com));

var_dump(->findOneByUsernameOrEmail('wayne'));