summaryrefslogtreecommitdiff
path: root/framework/prado-cli.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/prado-cli.php')
-rwxr-xr-xframework/prado-cli.php8
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);
}