Please verify that both your application uses the same model
definitions!
Maybe show how the models are defined (code) - so that we also may
verify that the associations/realationships are defined correctly.
That you have not defined the recursive somewhere in your models.

Also show the code that you use to retrieve the data.

Enjoy,
   John

On Jan 17, 10:02 am, powderfinger <[email protected]> wrote:
> I have a weird problem that i don't seem to be able to fix on my
> own...
>
> I have three models(let's call them A,B and C to keep it short) and
> they are connected as follows:
>
> A ----"belongsTo"----> B
> B ----"hasMany"-----> A
> B ----"belongsTo"----> C
> C ----"hasMany"-----> B
>
> when i fetch data from A i get this regardless of what i set recursive
> to in the a_controller.ctp :
>
> Array
> (
>     [A] => Array
>         (
>             [id] => 1
>             [b_id] => 1
>             ...
>         )
>
>     [B] => Array
>         (
>             [id] => 1
>             [c_id] => 1
>             ...
>         )
>
> I have another app under development and there i have the same model
> associations and there i get this data when recursive is set to 2 :
>
> Array
> (
>     [A] => Array
>         (
>             [id] => 1
>             [b_id] => 1
>             ...
>         )
>
>     [B] => Array
>         (
>             [id] => 1
>             [c_id] => 1
>             [C] => Array
>                   (
>                       [id] => 1
>                       [field] => value
>                   )
>             ...
>         )
>
> the only difference between these two is that in the later scenario i
> use cake 1.2.0.7962 and in the first 1.2.5
>
> What i want to do is just to fetch B and C from A so that i can
> present all data in A's view without having to present C as just an
> numeric index.
>
> A
> ----------------------------------
> id: A['id']
> b: B['C']['field']
>
> A
> ----------------------------------
> id: A['id']
> b: B['c_id']
>
> Is there anyone that could help me with this before it drives me
> crazy? :)
>
> thanks in advance!
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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