]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
fix driver conditions
authorAndrey Kutejko <andy128k@gmail.com>
Sat, 8 Jun 2013 19:18:27 +0000 (22:18 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sat, 8 Jun 2013 19:18:27 +0000 (22:18 +0300)
ipf/orm/connection/unitofwork.php
ipf/orm/query.php

index d4e85b97c96c06253d8c3be453aeefbcab9c4540..ff77796fca0da03a6e134340fe2389b6e2385bd6 100644 (file)
@@ -426,7 +426,7 @@ class IPF_ORM_Connection_UnitOfWork extends IPF_ORM_Connection_Module
 
         if (empty($seq) && count($identifier) == 1 && $identifier[0] == $table->getIdentifier() &&
             $table->getIdentifierType() != IPF_ORM::IDENTIFIER_NATURAL) {
-            if (strtolower($this->conn->getDriverName()) == 'pgsql') {
+            if (strtolower($this->conn->getDriverName()) == 'Pgsql') {
                 $seq = $table->getTableName() . '_' . $identifier[0];
             }
 
index c0cad6251c481b24e33e0877b39d6379770cb65b..597b1a47b06d1cff296e4a999d76356eca8b8446 100644 (file)
@@ -811,12 +811,12 @@ class IPF_ORM_Query extends IPF_ORM_Query_Abstract implements Countable, Seriali
                 // what about composite keys?
                 $idColumnName = $table->getColumnName($table->getIdentifier());
                 switch (strtolower($this->_conn->getDriverName())) {
-                    case 'mysql':
+                    case 'Mysql':
                         // mysql doesn't support LIMIT in subqueries
                         $list = $this->_conn->execute($subquery, $params)->fetchAll(IPF_ORM::FETCH_COLUMN);
                         $subquery = implode(', ', array_map(array($this->_conn, 'quote'), $list));
                         break;
-                    case 'pgsql':
+                    case 'Pgsql':
                         // pgsql needs special nested LIMIT subquery
                         $subquery = 'SELECT ipf_orm_subquery_alias.' . $idColumnName . ' FROM (' . $subquery . ') AS ipf_orm_subquery_alias';
                         break;