Re: Plugin Model Custom functions not accessible in controller

2012-08-08 Thread Luis Cano
It looks like this... public $hasAndBelongsToMany = array( 'Something' => array( 'className' => 'Something', 'joinTable' => 'other_models', 'foreignKey' => 'dog_id', 'associationForeignKey' => 'something_id', 'unique' => false

Re: Plugin Model Custom functions not accessible in controller

2012-08-08 Thread lowpass
What do the associations look like in Dog.php? On Tue, Aug 7, 2012 at 4:41 PM, Luis C wrote: > Ok, > It is even worse now. > > Let's say I have a hasAndBelongsToMany association in Dog.php with another > table (Model). And then in the Controller I have the following > > $this->Dog->find('all'); >

Re: Plugin Model Custom functions not accessible in controller

2012-08-08 Thread Steve Found
On 07/08/12 21:41, Luis C wrote: Ok, It is even worse now. Let's say I have a hasAndBelongsToMany association in Dog.php with another table (Model). And then in the Controller I have the following $this->Dog->find('all'); print_r($this->OtherModel); exit; Instead of getting an instance of Ot

Re: Plugin Model Custom functions not accessible in controller

2012-08-08 Thread Steve Found
On 07/08/12 19:29, Luis C wrote: Hello, I got a weird issue in CakePHP 2.2. I have created a plugin, let's call it PluginName, and within PluginName I have the following: Controller: - DogsController - CatsController Model - PluginNameAppModel.php - Dog.php - Cat.php (all mode

Re: Plugin Model Custom functions not accessible in controller

2012-08-07 Thread Luis C
Ok, It is even worse now. Let's say I have a hasAndBelongsToMany association in Dog.php with another table (Model). And then in the Controller I have the following $this->Dog->find('all'); print_r($this->OtherModel); exit; Instead of getting an instance of OtherModel and all of the associations

Plugin Model Custom functions not accessible in controller

2012-08-07 Thread Luis C
Hello, I got a weird issue in CakePHP 2.2. I have created a plugin, let's call it PluginName, and within PluginName I have the following: Controller: - DogsController - CatsController Model - PluginNameAppModel.php - Dog.php - Cat.php (all models extend the PluginNameAppModel.php