Due to a client's desire to have URLs that defy Cake logic, i have
decided to use the pages controller to organize my app.
most the site's functionality occurs from one page through ajax so i
thought i'd use pages as the home base and access other controllers
and models.
so i decided to import the relevant models.
i have tried all three methods:
$this->loadModel('Inventories');
$Inventories =& ClassRegistry::init('Inventories');
App::import('Controller', 'Inventories');
$Inventories = new InventoriesController;
Model seems to load fine but when i try to find some records:
$(...)->find("all", array(
'conditions' => array('id' => '1'),
'recursive'=>2)
);
i only get results as if recursive had been -1
or as if there were no other associated models
this happens no matter what level of recursive i put
and when i load the model in regular controllers, i get an appropriate
response.
any ideas how i can change my pages controller to retrieve associated
models like regular controllers?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php