this project in CakePHP at my job.
I am trying to figure out how to access a model from another
controller.
From what I have read, normally, you can do that by setting the
Associations (belongsTo, hasMany, etc) in the Models, and then in the
EventsController, $this->Car->find('all') etc.
But it looks like with those relationships, you ahve to setup keys
between each of the tables so that it can join the models together
correctly.
but what if i want to get access from another model that has no
association with the current controller that I am in? There is no
(user hasMany recipes, or recipes belongsTo user, etc) relationships.
There is no relation between the tables. But I would like to display
the data from that table/model into this controller/view.
I am not sure if I am missing something really simple, though I am
sure that I am (sorry for the noob question).
--~--~---------~--~----~------------~-------~--~----~
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 cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment