From 320e012d88c6512672b20354f66f08092f98326a Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sat, 10 Jan 2009 12:39:30 -0500 Subject: [PATCH] include the primary key in the Table object --- framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php | 1 + framework/Db/lib/Horde/Db/Adapter/Abstract/Table.php | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) 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; } -- 2.11.0