title: Symfony : eating all my ram when fetching from postgresql
body: <p>first of all this is what i am using :</p>
  <ul>
  <li>KDE neon User Edition 5.20 (Ubuntu 20.04)</li>
  <li>symfony CLI v4.21.3</li>
  <li>php v7.4.3</li>
  <li>PostgreSQL v12.5</li>
  </ul>
  <p>Apache2 is also installed but i'm using the symfony local server.<br />
  Apache2 and PostgreSQL are disabled, i start them whenever i want to work on this project.</p>
  <p>I had no problem while creating my entities and migrations using <code>php bin/console</code>.<br />
  And the <code>php bin/console doctrine:migrations:migrate</code> command created my tables correctly.<br />
  I had no problem inserting data to my tables.</p>
  <p>I got two different tables :</p>
  <ul>
  <li><a href="https://i.stack.imgur.com/1vngg.png" rel="nofollow noreferrer">Room</a></li>
  <li><a href="https://i.stack.imgur.com/0ROLe.png" rel="nofollow noreferrer">User</a></li>
  </ul>
  <p>They are in the public schema of my database and they currently have respectively 2 and 6 rows.</p>
  <p>I am trying to run the following code in my controller just to test :</p>
  <pre class="lang-php prettyprint-override"><code>class MainController extends AbstractController {
      /**
       * @Route(&quot;/&quot;, name=&quot;index&quot;)
       */
      public function index(): Response {
          $room = $this-&gt;getDoctrine()-&gt;getManager()-&gt;getRepository(Room::class)-&gt;find(1);
  
          var_dump($room);
  
          return $this-&gt;render(&quot;main/index.html.twig&quot;, [
              &quot;controller_name&quot; =&gt; &quot;welcome&quot;
          ]);
      }
  }
  </code></pre>
  <p>And for some reason when trying to load this page on my browser, symfony eats all my ram. If i don't close the tab or stop the local server my computer starts to slow down because the ram is full.</p>
  <p><a href="https://i.stack.imgur.com/94fa1.png" rel="nofollow noreferrer">My poor RAM</a></p>
  <p>Also i tried simply using :</p>
  <pre class="lang-php prettyprint-override"><code>$room = $this-&gt;getDoctrine()-&gt;getManager()-&gt;getRepository(Room::class)-&gt;findAll();
  </code></pre>
  <p>And i get the same problem.<br />
  But when trying to fetch something that does not exist everything works fine.</p>
  <pre class="lang-php prettyprint-override"><code>$room = $this-&gt;getDoctrine()-&gt;getManager()-&gt;getRepository(Room::class)-&gt;find(999);
  </code></pre>
  <p>Is it something from my setup ? Or postgresql ?</p>
  <p>Thank you.</p>