From 7407fefee265b9e9fb103c15459411607ce8960f Mon Sep 17 00:00:00 2001 From: romanb Date: Sat, 24 May 2008 19:56:35 +0000 Subject: [PATCH] Fix for new tests. --- lib/Doctrine/ClassMetadata/Factory.php | 2 +- lib/Doctrine/Formatter.php | 6 ++++-- lib/Doctrine/Query/Production/VariableDeclaration.php | 8 ++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/Doctrine/ClassMetadata/Factory.php b/lib/Doctrine/ClassMetadata/Factory.php index c26576d89..611576da1 100644 --- a/lib/Doctrine/ClassMetadata/Factory.php +++ b/lib/Doctrine/ClassMetadata/Factory.php @@ -57,7 +57,7 @@ class Doctrine_ClassMetadata_Factory * @return Doctrine_Metadata */ public function getMetadataFor($className) - { + { if (isset($this->_loadedMetadata[$className])) { return $this->_loadedMetadata[$className]; } diff --git a/lib/Doctrine/Formatter.php b/lib/Doctrine/Formatter.php index 634ebbdbe..be03b6428 100644 --- a/lib/Doctrine/Formatter.php +++ b/lib/Doctrine/Formatter.php @@ -236,8 +236,10 @@ class Doctrine_Formatter extends Doctrine_Connection_Module * @return string formatted table name */ public function getTableName($table) - { + { + return $table; + /* return sprintf($this->conn->getAttribute(Doctrine::ATTR_TBLNAME_FORMAT), - $table); + $table);*/ } } diff --git a/lib/Doctrine/Query/Production/VariableDeclaration.php b/lib/Doctrine/Query/Production/VariableDeclaration.php index c1b0aacf2..91eabe90e 100644 --- a/lib/Doctrine/Query/Production/VariableDeclaration.php +++ b/lib/Doctrine/Query/Production/VariableDeclaration.php @@ -125,12 +125,8 @@ class Doctrine_Query_Production_VariableDeclaration extends Doctrine_Query_Produ $queryComponent = $parserResult->getQueryComponent($this->_componentAlias); // Retrieving connection - $conn = $this->_parser->getSqlBuilder()->getConnection(); - $manager = Doctrine_Manager::getInstance(); - - if ($manager->hasConnectionForComponent($this->_componentName)) { - $conn = $manager->getConnectionForComponent($this->_componentName); - } + $manager = Doctrine_EntityManager::getManager(); + $conn = $manager->getConnection(); echo "Query Component Table Name: " . var_export($queryComponent['metadata']->getTableName(), true) . "\n";