[Solar-svn] Revision 2948

pmjones at solarphp.com pmjones at solarphp.com
Thu Nov 15 07:34:06 CST 2007


Solar_Sql_Model: [CHG] In _fixTableName(), *do not* modify the table name if already user specified.  This should help with legacy table names using their own capitalization rules.  Thanks, James Kilbride.


Modified: trunk/Solar/Sql/Model.php
===================================================================
--- trunk/Solar/Sql/Model.php	2007-11-15 13:23:49 UTC (rev 2947)
+++ trunk/Solar/Sql/Model.php	2007-11-15 13:34:06 UTC (rev 2948)
@@ -1998,7 +1998,8 @@
         }
         
         /**
-         * Auto-set the table name, if needed.
+         * Auto-set the table name, if needed; leave it alone if already
+         * user-specified.
          */
         if (empty($this->_table_name)) {
             // auto-defined table name. change TableName to table_name.
@@ -2007,9 +2008,6 @@
             // model improperly.
             $table = preg_replace('/([a-z])([A-Z])/', '$1_$2', $table);
             $this->_table_name = strtolower($table);
-        } else {
-            // user-defined table name.
-            $this->_table_name = strtolower($this->_table_name);
         }
     }
     




More information about the Solar-svn mailing list