title: ZF2 Doctrine - using query builder how to point at custom methods in repository
body: <p>I am struggling with this one and hope someone is able to help.  Building a webapp using ZF2 and Doctrine I am trying to build a query using Doctrine's query builder making use of a custom method in my entity file.  For simple example entity file as follows (shortened for clarity):</p>
  
  <pre><code>/**
   * Get firstName
   *
   * @return string 
   */
  public function getFirstName()
  {
      return $this-&gt;firstName;
  }
  
  /**
   * Get lastName
   *
   * @return string 
   */
  public function getLastName()
  {
      return $this-&gt;lastName;
  }
  public function getFullName()
  {
      return $this-&gt;getFirstName() . ' ' . $this-&gt;getLastName();
  }
  </code></pre>
  
  <p>So the first and last name are directly mapped to dB columns, getFullName is a custom method in the entity file.  Then extending the entity with a custom repository for queries I would like to make use of the getFullName method.  I have the following in the repository (which extends the entity file):</p>
  
  <pre><code>$qb = $this-&gt;_em-&gt;createQueryBuilder();
  $qb-&gt;select('employee')
      -&gt;from('Application\Entity\Employee', 'employee')
      -&gt;andWhere('employee.fullName = :foo')
      -&gt;setParameter('foo', 'Joe Bloggs');
  
  $query = $qb-&gt;getQuery();
  </code></pre>
  
  <p>I was hoping in the andWhere statement it would translate the employee.fullName to find the getFullName method but it appears not.  Does anyone have any ideas please?</p>
  
  <p>Thank you
  James</p>