Explorar o código

ZF-11766: Zend_Db: More descriptive exception message when table has no primary key

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24958 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan %!s(int64=13) %!d(string=hai) anos
pai
achega
08d52dd728
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      library/Zend/Db/Table/Abstract.php

+ 1 - 1
library/Zend/Db/Table/Abstract.php

@@ -886,7 +886,7 @@ abstract class Zend_Db_Table_Abstract
             // then throw an exception.
             if (empty($this->_primary)) {
                 require_once 'Zend/Db/Table/Exception.php';
-                throw new Zend_Db_Table_Exception('A table must have a primary key, but none was found');
+                throw new Zend_Db_Table_Exception("A table must have a primary key, but none was found for table '{$this->_name}'");
             }
         } else if (!is_array($this->_primary)) {
             $this->_primary = array(1 => $this->_primary);