I already use the plugin name... but when i call data $this->Category->find... it conflicts...
Em quinta-feira, 26 de julho de 2012 10h47min02s UTC-3, Saran Pal escreveu: > > Hi André Luis , > > its very simple, just use with plugin name. like Contact.Category. > > Cheers.... > > Saran Pal > > On Thu, Jul 26, 2012 at 7:02 PM, André Luis <[email protected]> wrote: > >> Hi people, i am having a trouble with models using same name, please help >> me if someone know how to fix it. >> >> I have the model Category at Representatives Plugin, also i have the >> model Category at Contact plugin, also i have the model Category at News >> Plugin, and they work very well. BUT i need to use the Model Category from >> Representatives at AppController, because it´s data will be visible at >> whole site, there is a menu created using this model. When i call public >> $uses=array("Representatives.Category"); at AppController, it works great. >> but when i use the Category model at Contact or at News plugin, it uses the >> Category model from Representatives plugin, yes, i know it´s because i am >> calling it at AppController, them it will be called even in my other >> plugins, since theyr main controllers extends AppController. >> Also, sometimes in News plugin for example, it shows a message that the >> ContactAppModel wasnt find... >> >> My question is: What cound i do to avoid this? >> >> I´ve tryed the followings. >> public $uses=array('Representatives.Category'=>'Rcategory') and use as >> $this->Rcategory, but didnt work, >> Tryed to create the Rcategory model extending the >> Representatives.Category model, didnt work too, >> Tryed to copy the entire content from Representatives.Category to >> Rcategory extendind the RepresentativesAppModel, and telling this model to >> use the same table of Representatives.Category, it works, but when i try to >> use the Contacts.Category model, it uses the Rcategory values instead, also >> with News.Category. >> >> Please help!! >> >> -- >> 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 >> > > -- 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
