$this-findBy* from the User model
you can access the associated model using $this-AssociatedModel-
find...
you should stick most of the model/query stuff inside models (fat
models, thin controllers)
loading models is an option but it really depends on the situation -
generally you shouldnt load
Hi Guys,
I currently validating from my controllers using Model findBy*
methods. Usually using many different model queries inside one
controller. Something like this:
//get user object
$results = $this-User-findByEmail($this-data['User']['email']);
if ($results $results['User']['password']
different model queries inside one
controller. Something like this:
--
View this message in context:
http://www.nabble.com/Model-Queries-inside-Model-Objects--tp14348200p14348261.html
Sent from the CakePHP mailing list archive at Nabble.com