title: How to manage Doctrine queries with multiple db schemas
body: <p>I have an entity A with a relation ManyToOne with B but A and B doesn't belong to the same DB schema.</p>
  
  <p>Entity 'A' belongs to MyBundle bundle, and entity 'B' belongs to MyOtherBundle bundle.</p>
  
  <p>The official documentation explain how to work with different connections : multiple schemas = multiple entity manager. But in my case I would like to join both entities.</p>
  
  <p>By doing :</p>
  
  <pre><code>$this-&gt;objEm-&gt;getRepository('MyBundle:MyEntity')-&gt;find($id);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$this-&gt;objEm-&gt;getRepository('MyBundle:MyEntity')-&gt;getMyResult($id);
  </code></pre>
  
  <p>I only call one of my repository, and I guess he's not able to get the other because in my config.yml I can chose only one connection.</p>
  
  <pre><code>doctrine:
    dbal:
     connections:
       connection1:
         driver:   "%database_driver%"
         host:     "%database_host%"
         port:     "%database_port%"
         dbname:   "%database_name%"
         user:     "%database_schema1_user%"
         password: "%database_schema1_password%"
         service:  "%database_service%"
         charset:  "Windows-1252"
       connection2:
         driver:   "%database_driver%"
         host:     "%database_host%"
         port:     "%database_port%"
         dbname:   "%database_name%"
         user:     "%database_schema2_user%"
         password: "%database_schema2_password%"
         service:  "%database_service%"
         charset:  "Windows-1252"
  
  orm:
    entity_managers:
      em1:
        connection:       connection1
        mappings:
                MyBundle: ~
                MyOtherBundle: ~
      em2:
        connection:       connection2
        mappings:
                MyOtherBundle: ~
  </code></pre>
  
  <p>Result : Whoops, looks like something went wrong.</p>
  
  <p>1/1ReflectionException: Class FQCN\Of\MyBundle\Entity\B does not exist ...</p>
  
  <p>"I know it doesn't exist dude, I want you to look at the good place now : like at FQCN\Of\MyOtherBundle\Entity\B"</p>
  
  <p>How can I force the path to my entity 'B'?</p>