Symfony3 Doctrine querybuilder
<p>I am writing Symfony3 app using Doctrine ORM.</p>

<p>I have a entity with all my attributes and their setters and getters.</p>

<p>Trying to build so that i can retrieve a row based on a email address.</p>

<pre><code>my query:

      /**
     * @param $email
     */
    public function getUserByEmail($email)
{
    $repository = $this-&gt;db-&gt;EntityManagerORM()
        -&gt;getRepository('TestBundle:User');

    $query = $repository-&gt;createQueryBuilder('t')
        -&gt;where('t.emial = :email')
        -&gt;setParameter(':email', $email)
        -&gt;getQuery();

    $test = $query-&gt;getResult();

    var_dump($test);
</code></pre>

<ol>
<li><p>$this->db is a EntityManager which is a service and instantiated in my __construct. so what i do is retrieve the entity, they create a queryBuilder where i want to retrieve a entire row which email == to the given email.</p>

<p>response I get:</p>

<pre><code>"Notice: Undefined index: [Semantical Error] line 0, col 63 near 'emial
</code></pre>

<p>= :ema': Error: Class Test\TestBundle\Entity\User has no field or </p>

<p>association named emial"</p></li>
</ol>

<p>anything suspicious in my code....?</p>