title: How to get an id without join in doctrine2?
body: <p>I have entity like this:</p>
  
  <pre><code>/**
   *
   * @Table(name="table")
   * @Entity
   */
   class Table {
  
      /**
       * @Column(type="integer")
       * @Id
       * @GeneratedValue(strategy="IDENTITY")
       */
       private $id;
  
  
      /**
       * @ManyToOne(targetEntity="Entities\Users")
       * @joinColumn(name="userId", referencedColumnName="id")
       */
       private $User;
  
  
      /**
       * @Column(type="string")
       */
       private $text;
  
  
  }
  </code></pre>
  
  <p>If i do 
       <code>$q-&gt;getQuery()-&gt;getSingleResult()-&gt;getUser()-&gt;getUserId()</code></p>
  
  <p>doctrine generate query like:</p>
  
  <pre><code>SELECT * FROM table t INNER JOIN users u ON u.id = t.userId WHERE id = 100
  </code></pre>
  
  <p>but if i don`t need table users, how to get an userId.</p>
  
  <p>In pure SQL i can just</p>
  
  <pre><code>SELECT * FROM table WHERE id = 100
  </code></pre>
  
  <p>and get userId without join users table.</p>