setAttribute( Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE ); $manager->setAttribute( Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, TRUE ); $manager->setAttribute( Doctrine::ATTR_USE_NATIVE_ENUM, TRUE ); $sdv1Conn = Doctrine_Manager::connection(DSN . '/sdv1', 'sdv1'); $sdv1Conn->setCharset('utf8'); Doctrine::loadModels(MODELS_PATH . DIRECTORY_SEPARATOR . 'sdv1'); $graydonConn = Doctrine_Manager::connection(DSN . '/graydon', 'graydon'); $graydonConn->setCharset('utf8'); Doctrine::loadModels(MODELS_PATH . DIRECTORY_SEPARATOR . 'graydon'); $intersudConn = Doctrine_Manager::connection(DSN . '/intersud', 'intersud'); $intersudConn->setCharset('utf8'); Doctrine::loadModels(MODELS_PATH . DIRECTORY_SEPARATOR . 'intersud'); function setDbConn($name){ global $manager; $currentName = $manager->getCurrentConnection()->getName(); if($currentName != $name){ //$currentConn = $manager->getCurrentConnection(); //$manager->closeConnection($currentConn); $manager->setCurrentConnection($name); Doctrine::loadModels(MODELS_PATH . DIRECTORY_SEPARATOR . $name); } } ?>