http://symfony.com/doc/current/cookbook/doctrine/multiple_entity_managers.html
Shows how to configure multiple DBAL Doctrine 2 connections (ignore the entity manager part).
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: customer
user: "%database_user2%"
password: "%database_password2%"
charset: UTF8
This will give a service called: doctrine.dbal.customer_connection, which you can pull out of the service container.
A DBAL join is a thin wrapper around a standard PHP PDO join object.
http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html
Shows how to use the connection. Basically the same as a PDO object.
You can also just create a service using the PDO object itself. I do not have an example convenient, but it is easy enough to do. This will completely eliminate the need for doctrine 2.