title: how to connect to another db with doctrine on zend framework
body: <p>I use Zend Framework 1.10 with integration on Doctrine 1.2.</p>
  
  <p>in the <strong><em>application.ini</em></strong>  file, i declare the '<strong>dsn</strong>' to connect to database.</p>
  
  <p>in my application i need to connect to another db to run some queries.</p>
  
  <p>how can i do it ? </p>
  
  <p>i only need to run query , i don't want to generate all the Models for this DB.</p>
  
  <p>right now in the <strong><em>bootstrap.php</em></strong> i do the default  connection :</p>
  
  <pre><code>     protected function _initDoctrine()
          {
              $this-&gt;getApplication()-&gt;getAutoloader()
                  -&gt;pushAutoloader(array('Doctrine', 'autoload'));
              spl_autoload_register(array('Doctrine', 'modelsAutoload'));
  
              $doctrineConfig = $this-&gt;getOption('doctrine');
              $manager = Doctrine_Manager::getInstance();
              $manager-&gt;setAttribute(Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true);
              $manager-&gt;setAttribute(
                Doctrine::ATTR_MODEL_LOADING,
                $doctrineConfig['model_autoloading']
              );
  
              Doctrine_Core::loadModels($doctrineConfig['models_path']);
  
              $conn = Doctrine_Manager::connection($doctrineConfig['dsn'],'doctrine');
              $conn-&gt;setAttribute(Doctrine::ATTR_USE_NATIVE_ENUM, true);
              Doctrine_Core::generateModelsFromDb('models', array('doctrine'), array('generateTableClasses' =&gt; true));
           return $conn;
  }
  </code></pre>