Re: Single controller file to access multiple model files

2009-07-13 Thread thatsgreat2345
If you are going to load a lot of models into one I WOULD NOT RECOMMEND THIS! You should use database relations to navigate, ie. $this->User->Post->find(); or Use containable as well. Or use $this- >loadModel when you need it. Putting a lot of models into the uses variable slows your sites speed d

Re: Single controller file to access multiple model files

2009-07-13 Thread Vijay Kumbhar
Hello Sheetal, You are right about using the $uses. You have to use that as follows, var $uses = array('Main model name' , '2nd model name' ...so on); in the add function you have to write, $this->modelname->tablefieldname = $this->data['modelname']['form_field_name']; //here $this->data['m

Single controller file to access multiple model files

2009-07-13 Thread Sheetal
Hi Friends My scenario is : I have a single controller file, lets keep its name as conditions_controller.php. This controller file saves the details that are submitted from a form. But the form details needs to be saved in 3 different table. The thing here is I am saving it in 3 different tables.