Re: Refer to non-association model
On 7/22/07, Walker Hamilton [EMAIL PROTECTED] wrote: put: var $uses = array('User', 'Category'); ...at the top of your users_controller class It works now. Thanks Walker ! Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Refer to non-association model
On 7/22/07, Langdon Stevenson [EMAIL PROTECTED] wrote: Hi Feris To access an unrelated model you need to set: var $uses = array('ModelName'); in your controller. You can get more information on this from the manual. Hi Langdon, Thanks ! It works now, I looked at wrong section of the manual (model). Regards, Langdon Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Refer to non-association model
Hi All, I have two models : 1. Users 2. Categories Which have no model association at all. In user controller (user_controller.php), I like to view a list of categories (Category Model) but I failed. I try to use $this-Category-findAll method inside function of user controller, but it returns Notice: Undefined property: User::$Category in . What's wrong ? How can I refer to another model in controller that has no direct association with the model ? Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Refer to non-association model
put: var $uses = array('User', 'Category'); ...at the top of your users_controller class --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---