Model associations are just an extension a properly normalised
database so if you have those tables in your database then each one
needs a model and you use associations to link those models together
in the appropriate manner.

This is fundamental stuff and is all explained in the book, I suggest
you read it through a few more times so it sinks in.

HTH, Paul.

On Oct 9, 6:59 am, SyNeto <[email protected]> wrote:
> I decided to make a model named site and link users to thar model,
> users have some links to other models like news and post, it's this a
> betther aproach?
>
> On 8 oct, 19:48, andrewperk <[email protected]> wrote:
>
>
>
>
>
>
>
> > If your model has an association with the other model that you want to
> > retrieve from, each time you do a find it will also retrieve any
> > associated data as well. You can read about it here:
>
> >http://book.cakephp.org/view/1039/Associations-Linking-Models-Together
>
> > You can also use App::import. For instance if you wanted to import a
> > User model so you could use it in a Tasks controller:
>
> > App::import('Model', 'User');
> > $userModel= new User();
> > $userModel->find()
>
> > ClassRegistry::init works as well.
>
> > On Oct 7, 12:53 am, SyNeto <[email protected]> wrote:
>
> > > Hi, im pretty new in cakephp, so feel free to correct me,
>
> > > I have read the phpcake blog tutorial, and i have some noobs questions
> > > about controllers.
>
> > > if i need a view to display information from more than one model, how
> > > can i achive this task?
>
> > > I have already read some information about elements in views and some
> > > information about the ClassRegistry::init, but i dont know if i am in
> > > the rigth path.
>
> > > tanks.
>
> > > Ernesto Jiménez Villseñor.
>
> > > PS. sorry about my english.

-- 
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

Reply via email to