title: Zend - doctrine 2 querybuilder help
body: <p>i want to use this:</p>
  
  <pre><code>$query = $this-&gt;_doctrine-&gt;createQueryBuilder()
          -&gt;select('u')
          -&gt;from('\Entities\Users', 'l')
          -&gt;leftJoin('l.userentities', 'u')
          -&gt;getQuery();
  return $info = $query-&gt;getResult();
  </code></pre>
  
  <p>and my users entity is:</p>
  
  <pre><code>namespace Entities\Users;
  
  /**
   * @Entity
   * @Table(name="users")
   * @HasLifecycleCallbacks
   */
  class Users extends \Entities\AbstractEntity
  {
      /**
       * @Id @Column(name="userid", type="integer")
       * @GeneratedValue(strategy="AUTO")
       */
      protected $userid;
        /** @Column(name="itemid", type="integer") */
  
      protected $itemid;
  }
  </code></pre>
  
  <p>and my user entities entity class contains:</p>
  
  <pre><code>namespace Entities\Users;
  
  /**
   * @Entity
   * @Table(name="userentities")
   * @HasLifecycleCallbacks
   */
  class Userentities extends \Entities\AbstractEntity
  {
      /**
       * @Id @Column(name="entityid", type="integer")
       * @GeneratedValue(strategy="AUTO")
       */
      protected $entityid;
        /** @Column(name="userid", type="integer") */
  
      protected $userid;
  
       /** @Column(name="crb", type="string") */
  
      protected $crb;
  
  }
  </code></pre>
  
  <p>i tried put this into the entity but no joy
           * @OneToMany(targetEntity="Users", inversedBy="userid")
           * @JoinColumn(name="userid", referencedColumnName="userid") </p>
  
  <p>1 user has many user entities..</p>
  
  <p>and i get this error:</p>
  
  <p>Error: Class Entities\Users has no association named Users</p>
  
  <p>i just want to do a left join with users to usersentities..</p>
  
  <p>how can i doa left join?</p>