I show my real application.
Model A:
Class Informazione .....
var $belongsTo = array('InformazioneTipo' =>
);
var $hasAndBelongsToMany = array('InformazioneCampo' =>
);
In model A I change the fields returned on associated model.
Model B :
class InformazioneTipo .....
var $hasMany = array('Informazione' =>
);
var $hasAndBelongsToMany = array('InformazioneCampo' =>
);
Model C:
class InformazioneCampo ......
var $hasAndBelongsToMany = array('InformazioneTipo' =>
);
View for findAll without recursive:
Array
(
[0] => Array
(
[Informazione] => Array
(
[informazione_id] => .....
)
[InformazioneTipo] => Array
(
[tipo_id] => ....
)
[InformazioneCampo] => Array
(
[0] => Array
(
[campo_id] => ....
)
)
And this is all ok
View for findAll with recursive=3:
Array
(
[0] => Array
(
[Informazione] => Array
(
[informazione_id] => ....
)
[InformazioneTipo] => Array
(
[tipo_id] => 1...
[Informazione] => Array
(
[0] => Array
(
[informazione_id] => ....
[InformazioneTipo] => Array
(
[tipo_id] => ....
)
[InformazioneCampo] => Array
(
) /*This is empty ERROR*/
)
)
[InformazioneCampo] => Array
(
[0] => Array
(
[campo_id] => ....
)
)
)
On 7 Gen, 20:13, AD7six <[EMAIL PROTECTED]> wrote:
> On Jan 7, 8:11 pm, AD7six <[EMAIL PROTECTED]> wrote:
>
> > You overwrote the find method, just to change the fields returned on
> > an associated model?
>
> Whoops I clicked send too soon.
>
> I find that a bit A given that B and and should be used to do C.
>
> Where:
> A = strange
> B = bindModel/your association definitions
> C = the same thing.
>
> hth,
>
> AD
> PS. Real names are easier to understand.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---