Author: romanb
Date: 2008-05-16 21:40:54 +0100 (Fri, 16 May 2008)
New Revision: 4366
Modified:
branches/0.11/lib/Doctrine/Connection.php
branches/0.11/lib/Doctrine/Hydrator.php
branches/0.11/lib/Doctrine/Query/JoinCondition.php
Log:
Fixed #917.
Modified: branches/0.11/lib/Doctrine/Connection.php
===================================================================
--- branches/0.11/lib/Doctrine/Connection.php 2008-05-16 19:09:48 UTC (rev 4365)
+++ branches/0.11/lib/Doctrine/Connection.php 2008-05-16 20:40:54 UTC (rev 4366)
@@ -452,13 +452,13 @@
if (extension_loaded('pdo')) {
if (in_array($e[0], PDO::getAvailableDrivers())) {
- try {
- $this->dbh = new PDO($this->options['dsn'], $this->options['username'],
- $this->options['password'], $this->options['other']);
-
- $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- } catch (PDOException $e) {
- throw new Doctrine_Connection_Exception('PDO Connection Error: ' . $e->getMessage());
+ try {
+ $this->dbh = new PDO($this->options['dsn'], $this->options['username'],
+ $this->options['password'], $this->options['other']);
+
+ $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ } catch (PDOException $e) {
+ throw new Doctrine_Connection_Exception('PDO Connection Error: ' . $e->getMessage());
}
$found = true;
}
Modified: branches/0.11/lib/Doctrine/Hydrator.php
===================================================================
--- branches/0.11/lib/Doctrine/Hydrator.php 2008-05-16 19:09:48 UTC (rev 4365)
+++ branches/0.11/lib/Doctrine/Hydrator.php 2008-05-16 20:40:54 UTC (rev 4366)
@@ -283,6 +283,9 @@
foreach ($data as $key => $value) {
// Parse each column name only once. Cache the results.
if ( ! isset($cache[$key])) {
+ // check ignored names. fastest solution for now. if we get more we'll start
+ // to introduce a list.
+ if ($key == 'DOCTRINE_ROWNUM') continue;
$e = explode('__', $key);
$last = strtolower(array_pop($e));
$cache[$key]['dqlAlias'] = $this->_tableAliases[strtolower(implode('__', $e))];
Modified: branches/0.11/lib/Doctrine/Query/JoinCondition.php
===================================================================
--- branches/0.11/lib/Doctrine/Query/JoinCondition.php 2008-05-16 19:09:48 UTC (rev 4365)
+++ branches/0.11/lib/Doctrine/Query/JoinCondition.php 2008-05-16 20:40:54 UTC (rev 4366)
@@ -35,7 +35,7 @@
public function load($condition)
{
$condition = trim($condition);
-
+
$e = $this->_tokenizer->sqlExplode($condition);
if (count($e) > 2) {