title: How to prevent Doctrine from lazy loading one to one relationsip?
body: <p>EDIT: If you're having similar issues <a href="https://stackoverflow.com/questions/9848747/primary-key-of-owning-side-as-a-join-column">This Topic</a> will be of interest to you</p>
  
  <p>I have User and UserSettings with one to one bidirectional relationship. It appears that even if i do not use any UserSettings values in my page, doctrine lazy loads it anyways.</p>
  
  <p>Is this expected behavior? Why is Doctrine fetching this data even though I'm not using it in my page? If I'm unable to stop it, I would have to join this UserSettings to User every time I retrieve user object, but this is so unnecessary. </p>
  
  <p>What can I do to prevent this from happening?</p>
  
  <p>Code that loads data:</p>
  
  <pre><code>-&gt;createQuery('SELECT p, u, s FROM TestPostBundle:Post p LEFT JOIN p.user u LEFT JOIN p.sub s WHERE p.id IN (:ids)')
  -&gt;setParameter('ids', $ids)
  -&gt;getResult();
  </code></pre>
  
  <p>The in twig I loop through posts and display Post data and associated user, but I never request any UserSettings variables, I'm not accessing them at all.</p>