On Jan 26, 4:52 pm, RoVo <[email protected]> wrote:
> Hi Dieter,
>
> an example. We have 3 models (HABTM):
> Posts <-> PostsTag <-> Tag
>
> If I bake only Posts and Tag (model, controller and views), I get a
> results like yours . NO related Tags
>
> NOW I bake the PostsTag-model with belongsTo Post and belongsTo Tag.
> If I bake the Post-controller and views again...
> UUPS!?!
> Related Tags are in the view.ctp :)

Do you mean related "PostTag"s ?
I really don't understand how to get any associatons other then direct
ones when baking.
Even when I set $var recursive = 3; in the model, and $this->model-
>recursive = 3; in all functions of the controller, when I do "print_r
($associations); die();" in the view.ctp template, I only see the
direct associatons.

also, in the default view.ctp template only $associations
['hasAndBelongsToMany'], $associations['hasMany']. $associations
['belongsTo'] and $associations['hasOne'] are iterated, not the
elements of their elements (eg 2nd level associatons).  I wouldn't
mind writing the code for this myself, if only $associations would
contain the metadata (fields etc) of 2nd level associatons.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to