It looks like this...
public $hasAndBelongsToMany = array(
'Something' => array(
'className' => 'Something',
'joinTable' => 'other_models',
'foreignKey' => 'dog_id',
'associationForeignKey' => 'something_id',
'unique' => false
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');
>
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
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
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
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