[Solar-svn] Revision 2704

pmjones at solarphp.com pmjones at solarphp.com
Wed Aug 15 20:23:14 CDT 2007


Branch: Solar_Sql_Model: [FIX] In method newRecord(), fall back to the default record class even when inheritance is turned on



Modified: branches/orm/Solar/Sql/Model.php
===================================================================
--- branches/orm/Solar/Sql/Model.php	2007-08-16 01:22:11 UTC (rev 2703)
+++ branches/orm/Solar/Sql/Model.php	2007-08-16 01:23:14 UTC (rev 2704)
@@ -609,7 +609,6 @@
         } else {
             throw $this->_exception('ERR_METHOD_NOT_IMPLEMENTED', array(
                 'method' => $method,
-                'params' => $params,
             ));
         }
         
@@ -1262,11 +1261,14 @@
             // note that $class could still end up false, as we might not find
             // a related class in the hierarchy.
             $class = $this->_stack->load($inherit . '_Record', false);
-        } else {
+        }
+        
+        // even if inheritance failed, look for a model-specific record class
+        if (! $class) {
             $class = $this->_stack->load('Record', false);
         }
         
-        // final fallback
+        // final fallback: the default record class
         if (! $class) {
             $class = $this->_record_class;
         }




More information about the Solar-svn mailing list