Using multiple models in an MVC component

From Joomla! Documentation

Revision as of 15:23, 6 October 2010 by Adamski102 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

It is worth to remember about prefix:

$model =& $this->getModel( 'Customer','CustomersModel' );

in this example the framework will attempt to find class CustomersModelCustomer

Lack of the model prefix may cause the following: Fatal error: Call to a member function getName() on a non-object in {...}/libraries/joomla/application/component/view.php on line 449