[Solar-talk] Changes afoot: a new Model class
Jeff Surgeson
solar at 3hex.com
Thu Feb 8 11:46:58 PST 2007
Hi Guys
Can someone give me a few lines on the use of the new Model class, how would I
go about using it with a existing data model, is the following sort of right?
class Bulldog_Model_Nodes extends Solar_Sql_Model {
....same as other data models
}
class Bulldog_App_Main extends Bulldog_App {
public $nodes;
public $node;
protected function _setup()
{
parent::_setup();
$this->nodes = Solar::factory('Bulldog_Model_Nodes');
}
public function actionHome()
{
// get a single record from the model
$this->node = $this->nodes->fetchOne();
}
}
Cant seem to work out how this should be done, any help would be appreciated!
--
...........::::::...........
Jeff Surgeson / South Africa
More information about the solar-talk
mailing list