Short answer, No.
You can setup multiple database connections and use the same entity classes for both of them. But a single entity will not be able to have properties that map to different databases. You may have reference fields on there but those will need to just be keys that you can use to look them up using the other connection. For example imagine the following setup:
doctrine:
dbal:
default_connection: default
connections:
default:
driver: '%database_driver%'
host: '%database_host%'
port: '%database_port%'
dbname: '%database_name%'
user: '%database_user%'
password: '%database_password%'
charset: UTF8
customer:
driver: '%database_driver2%'
host: '%database_host2%'
port: '%database_port2%'
dbname: '%database_name2%'
user: '%database_user2%'
password: '%database_password2%'
charset: UTF8
orm:
default_entity_manager: default
entity_managers:
default:
connection: default
mappings:
AcmeBundle: ~
customer:
connection: customer
mappings:
AcmeBundle: ~
Both managers will use the entity classes in the AcmeBundle. Then you can do something like
public function someControllerAction(){
// Get customer from the default connection
$customer = $this->getDoctrine()
->getManager() // If no value is provided the default is implied
->getRepository('AcmeBundle:Customer')
->findOneBy([
'id'=>12
]);
// Get the customers details from another connection
$customerDetails = $this->getDoctrine()
->getManager('customer')
->getRepository('AcmeBundle:CustomerDetails')
->findOneBy([
'customer_details_id' => $customer->getDetailsId()
]);
...
}