title: Combine result from different databases
body: <p>I have 2 databases: history and active. They have almost the same number and structure of tables. Currently we use this approach:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  class UserController extends AbstractController
  {
      public function getMessages() {
  
      $activeMessages = $em
          -&gt;getRepository(Message::class)
          -&gt;getMessages($options);
  
      $historyMessages = $em
          -&gt;getManager('history')
          -&gt;getRepository(Message::class)
          -&gt;getMessages($options);
  
      $messages = array_merge($historyMessages, $activeMessages);
      
      return $this-&gt;render('messages.html.twig', [
          'messages ' =&gt; $messages
      ]);
      }
  }
  </code></pre>
  <p>Can I merge the response from 2 databases using doctrine instead of merging it with php?</p>