hi forrestgump, using $this->find() in controller doesn't voilate the MVC architecture even if you use $this->find('all')
but i heared if you direct query in controller will violate the MVC rule i.e if you use $this->Model->query("select * from models"); the above query will violate the MVC rule. i heared the queries should not be written in controller it should be in model i.e in ur model.php even i am also not absolute on this part On Sep 23, 2:33 pm, forrestgump <[EMAIL PROTECTED]> wrote: > Hey guys, > Considering the fact that CakePhp follows the MVC architecture, id > like to know...y we dont make function calls such as $this->find("where > id=xyz") from function blocks typed out in Models rather > > than controllers....im sure there is a logical reason to it...but > someone asked me this question and i could not give her a good enuf > answer....does making function calls to queries like find(), save() > work better in models or controllers?.....and is it good practice to > pass conditions in your function call while using it in a controller? > eg find("where id=1") ; > > Does using $this->find() in controller violate the MVC architecture in > any manner? > > Can someone please clarify these question for us? > > Thanks in advance, > forrestgump --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---