title: DQL QueryBuilder exception
body: <p><strong>Hello!</strong></p>
  
  <p>I've tried to set a DQL query using QueryBuilder but so far no good...
  The query I'd like to have looks like this:</p>
  
  <pre><code>$queryBuilder = Zend_Registry::get('entityManager')-&gt;createQueryBuilder();
  $queryBuilder-&gt;select('s.*');
  $queryBuilder-&gt;from('GPos_Model_Sale', 's');
  $queryBuilder-&gt;where('s.store = ?', $authNamespace-&gt;store); //breaks on this line
  $queryBuilder-&gt;andWhere('s.seller = ?', $seller-&gt;getId());
  $queryBuilder-&gt;andWhere('((s.date &gt;= ?', $dateStart);
  $queryBuilder-&gt;andWhere('s.date &lt;= ?', $dateEnd);
  $queryBuilder-&gt;andWhere('s.status = "closed") OR s.status = "onhold")');
  $queryBuilder-&gt;groupby('s.id');
  return $queryBuilder-&gt;getQuery()-&gt;getResult();
  </code></pre>
  
  <p><em>Note</em>: I know I could use the ->andWhere etc one after another but it was just for XDebug purpose.<br>
  <em>Note2</em>: $authNamespace->store stands for a GPos_Model_Store entity's ID.</p>
  
  <p>Anyways, I get an Exception on <code>$queryBuilder-&gt;where('s.store = ?', $authNamespace-&gt;store)</code> stating : "Expression of type '' not allowed in this context."</p>
  
  <p>I tried using an entity itself instead but then I received a "Expression of type 'GPos_Model_Store' not allowed in this context." exception...</p>
  
  <p>Can any of you point out what I'm doing wrong here ?</p>
  
  <p>Thank you!</p>