title: Doctrine bidirectional association error. Memory exhausted
body: <p>I have two doctrine  entities <em>school</em> and <em>schoolLocation</em> in zend framwork</p>
  
  <p><em>school entity</em></p>
  
  <pre><code>/**
   * @var schoolLocation
   * 
   * @ORM\OneToMany(targetEntity="\School\Entity\SchoolLocation", mappedBy="school", cascade={"persist","remove"})
   * 
   */
  protected $schoolLocation;
  </code></pre>
  
  <p>and</p>
  
  <p><em>schoolLocation entity</em></p>
  
  <pre><code>/**
   * @var school
   *
   * @ORM\ManyToOne(targetEntity="\School\Entity\School", inversedBy="schoolLocation")
   * @ORM\JoinColumn(name="school_id", referencedColumnName="id")
   */
  protected $school;
  </code></pre>
  
  <p>I've shown bidirectional association. Now whenever I try to get school_location</p>
  
  <p><code>$schoolLocation = $this-&gt;entityManager-&gt;getRepository(SchoolLocation::class)-&gt;findAll();</code></p>
  
  <p>and <code>print_r($schoolLocation)</code> I am getting following error message:</p>
  
  <p><code>Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 65015808 bytes) in F:\projects\test\module\School\src\Service\SchoolManager.php on line 190</code></p>
  
  <p>Could anybody please help me telling, what am I doing wrong here ? </p>