include the primary key in the Table object
authorChuck Hagenbuch <chuck@horde.org>
Sat, 10 Jan 2009 17:39:30 +0000 (12:39 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 10 Jan 2009 17:39:30 +0000 (12:39 -0500)
framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php
framework/Db/lib/Horde/Db/Adapter/Abstract/Table.php

index edf7100..65352db 100644 (file)
@@ -256,6 +256,7 @@ abstract class Horde_Db_Adapter_Abstract_Schema
     {
         return $this->componentFactory('Table', array(
             $tableName,
+            $this->primaryKey($tableName),
             $this->columns($tableName, $name),
             $this->indexes($tableName, $name),
         ));
index f948e29..79ae49a 100644 (file)
@@ -38,11 +38,12 @@ class Horde_Db_Adapter_Abstract_Table
      *
      * @param   string  $name     The table's name, such as <tt>supplier_id</tt> in <tt>supplier_id int(11)</tt>.
      */
-    public function __construct($name, $columns, $indexes)
+    public function __construct($name, $primaryKey, $columns, $indexes)
     {
-        $this->_name    = $name;
-        $this->_columns = $columns;
-        $this->_indexes = $indexes;
+        $this->_name       = $name;
+        $this->_primaryKey = $primaryKey;
+        $this->_columns    = $columns;
+        $this->_indexes    = $indexes;
     }