summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Vendor
diff options
context:
space:
mode:
authorwei <>2007-01-20 23:46:35 +0000
committerwei <>2007-01-20 23:46:35 +0000
commit9e6fdda71cf70275fcf7e4b09230daa713c18b70 (patch)
tree64002b0b5215c377906ba7435adc0309573f1539 /framework/Data/ActiveRecord/Vendor
parentd11d7c6003569ae5c8994c23a533757a1f9ae981 (diff)
minor changes to active record meta data inspector
Diffstat (limited to 'framework/Data/ActiveRecord/Vendor')
-rw-r--r--framework/Data/ActiveRecord/Vendor/TPgsqlMetaDataInspector.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/framework/Data/ActiveRecord/Vendor/TPgsqlMetaDataInspector.php b/framework/Data/ActiveRecord/Vendor/TPgsqlMetaDataInspector.php
index bcdfefe3..9d474f14 100644
--- a/framework/Data/ActiveRecord/Vendor/TPgsqlMetaDataInspector.php
+++ b/framework/Data/ActiveRecord/Vendor/TPgsqlMetaDataInspector.php
@@ -80,6 +80,16 @@ EOD;
*/
protected function getColumnDefinitions($table)
{
+ if(count($parts= explode('.', $table)) > 1)
+ {
+ $tablename = $parts[1];
+ $schema = $parts[0];
+ }
+ else
+ {
+ $tablename = $parts[0];
+ $schema = $this->getDefaultSchema();
+ }
// This query is made much more complex by the addition of the 'attisserial' field.
// The subquery to get that field checks to see if there is an internally dependent
// sequence on the field.
@@ -116,8 +126,8 @@ EOD;
$conn = $this->getDbConnection();
$conn->setActive(true);
$command = $conn->createCommand($sql);
- $command->bindValue(':table', $table);
- $command->bindValue(':schema', $this->getDefaultSchema());
+ $command->bindValue(':table', $tablename);
+ $command->bindValue(':schema', $schema);
$cols = array();
foreach($command->query() as $col)
$cols[$col['attname']] = $this->getColumnMetaData($col);