Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.2.3
-
Fix Version/s: None
-
Component/s: Connection
-
Labels:None
-
Environment:All
Description
Line# 1036
When using Table::createQuery, null is specified as the connection when calling Doctrine_Query::create() which results in using the default connection while the "correct" connection can be know ($this->getConnection())
here is the fix:
— a/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Table.php
+++ b/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Table.php
@@ -1033,7 +1033,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
$class = $this->getAttribute(Doctrine_Core::ATTR_QUERY_CLASS);
- return Doctrine_Query::create(null, $class)
+ return Doctrine_Query::create($this->getConnection(), $class)
>from($this>getComponentName() . $alias);
}