Not sure what the issue is, but in general I'd recommend that you set recursive to -1 in your app_model and then use the Containable behaviour; it gives you total control and my well solve your issue (as well as bring other improvements).
Jeremy Burns Class Outfit http://www.classoutfit.com On 16 Nov 2011, at 23:36, billy wrote: > 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 > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php -- 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 [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
