From: Chuck Hagenbuch Date: Sat, 10 Jan 2009 17:39:30 +0000 (-0500) Subject: include the primary key in the Table object X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=320e012d88c6512672b20354f66f08092f98326a;p=horde.git include the primary key in the Table object --- diff --git a/framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php index edf7100a7..65352dbf0 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php @@ -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), )); diff --git a/framework/Db/lib/Horde/Db/Adapter/Abstract/Table.php b/framework/Db/lib/Horde/Db/Adapter/Abstract/Table.php index f948e29e7..79ae49a15 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Abstract/Table.php +++ b/framework/Db/lib/Horde/Db/Adapter/Abstract/Table.php @@ -38,11 +38,12 @@ class Horde_Db_Adapter_Abstract_Table * * @param string $name The table's name, such as supplier_id in supplier_id int(11). */ - 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; }