[Solar-svn] Revision 2725
pmjones at solarphp.com
pmjones at solarphp.com
Tue Aug 21 10:04:25 CDT 2007
Branch: Solar_Cli_MakeModel: [CHG] Now throws an exception if the table has no cols.
Modified: branches/orm/Solar/Cli/MakeModel.php
===================================================================
--- branches/orm/Solar/Cli/MakeModel.php 2007-08-21 15:03:17 UTC (rev 2724)
+++ branches/orm/Solar/Cli/MakeModel.php 2007-08-21 15:04:25 UTC (rev 2725)
@@ -41,7 +41,13 @@
// get the table info
$sql = Solar::factory('Solar_Sql', $this->_getSqlConfig());
$table_cols = $sql->fetchTableCols($this->_table);
+ if (! $table_cols) {
+ throw $this->_exception('ERR_NO_COLS', array(
+ 'table' => $this->_table
+ ));
+ }
+ // what class the model extends from
$extends = 'Solar_Sql_Model';
// get the class model template
More information about the Solar-svn
mailing list