diff options
author | wei <> | 2007-04-14 05:02:29 +0000 |
---|---|---|
committer | wei <> | 2007-04-14 05:02:29 +0000 |
commit | 0f0d3c62e608287cdf77f1a3239371b521ecb40b (patch) | |
tree | bd91a9499a946e1667a0e17a9c5a97a9d695c7ce /framework/prado-cli.php | |
parent | b05442bbe751b87998d8500ad8e6b28d652a35db (diff) |
Refactor ActiveRecordGateway to use TDataGatewayCommand
Diffstat (limited to 'framework/prado-cli.php')
-rwxr-xr-x | framework/prado-cli.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/prado-cli.php b/framework/prado-cli.php index 537cbf98..ca3e1461 100755 --- a/framework/prado-cli.php +++ b/framework/prado-cli.php @@ -662,9 +662,9 @@ class PradoCommandLineActiveRecordGen extends PradoCommandLineAction protected function generateActiveRecord($config, $tablename, $output) { $manager = TActiveRecordManager::getInstance(); - $inspector = $manager->getTableInspector($manager->getDbConnection()); - $meta = $inspector->getTableMetaData($tablename); - if(count($meta->getColumns()) === 0) + $gateway = $manager->getRecordGateway(); + $tableInfo = $gateway->getTableInfo($manager->getDbConnection(), $tablename); + if(count($tableInfo->getColumns()) === 0) { echo '** Unable to find table or view "'.$tablename.'" in "'.$manager->getDbConnection()->getConnectionString()."\".\n"; return false; @@ -672,7 +672,7 @@ class PradoCommandLineActiveRecordGen extends PradoCommandLineAction else { $properties = array(); - foreach($meta->getColumns() as $field=>$column) + foreach($tableInfo->getColumns() as $field=>$column) $properties[] = $this->generateProperty($field,$column); } |