title: Doctrine 2 OneToOne entity mapping returns empty Entities
body: <p><strong>The setup:</strong></p>
  
  <p>I have the following code two entity models:</p>
  
  <p>Account, representing the user account and has a foreign key to classroom.</p>
  
  <pre><code>&lt;?php
  namespace models;
  
  /**
   * @Entity
   */
  class Account
  {
      /**
       * @Id @Column(type="integer")
       * @GeneratedValue(strategy="AUTO")
       */
      public $id;
  
      /**
       * @OneToOne(targetEntity="Classroom")
       */
      public $classroom;
  }
  </code></pre>
  
  <p>Classroom that represents the classroom a Student is enroled in.</p>
  
  <pre><code>&lt;?php
  namespace models;
  
  /**
   * @Entity
   */
  class Classroom
  {
      /**
       * @Id @Column(type="integer")
       * @GeneratedValue(strategy="AUTO")
       */
      public $id;
  
      /**
       * @Column(type="string")
       */
      public $name;
  }
  </code></pre>
  
  <p><strong>The problem:</strong></p>
  
  <p>When I do <code>$account = $em-&gt;find('Account',$id);</code> I correctly get the account back from the database, but the <code>$account-&gt;classroom;</code> is an empty (not null) object. After experimenting a bit I tried adding the following command before the execution:</p>
  
  <pre><code>$em-&gt;getRepository('Classroom')-&gt;findAll().
  </code></pre>
  
  <p>Then I executed the <code>$em-&gt;find('Account', $id );</code> and the classroom object inside the account object returned correctly.</p>
  
  <p><strong>Speculation:</strong></p>
  
  <p>I assume that there is something wrong with the way entities are loaded and cached from the database, because if I load all the classroom objects (or the one associated with the account I) before I do my <code>find()</code>, then everything is fine.</p>
  
  <p>As I'm beginner of PHP and Doctrine, I seek further opinions/help to solve that issue.</p>