Re: recursive for parents

2009-04-30 Thread fain182

 Right. I had mixed up the hasMany/belongsTo relationships. I believe
 that, if it was the other way around, you'd get all the models.
there is no way to have the parents of the parents of a model ?!
it's really strange...

thank you, pietro

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive for parents

2009-04-30 Thread fain182

maybe i found the solution.. linkable behavior:
http://rafaelbandeira3.wordpress.com/2008/11/16/linkable-behavior-taking-it-easy-in-your-db/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive for parents

2009-04-30 Thread fain182

solution was simple...
var $recursive = 4

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive for parents

2009-04-30 Thread brian

It goes up to 4?!? Signs and wonders ...

On Thu, Apr 30, 2009 at 11:26 AM, fain182 fain...@gmail.com wrote:

 solution was simple...
 var $recursive = 4

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



recursive for parents

2009-04-29 Thread fain182

hello,
i have 5 model related in this way:
A belongs to B (B has many A)
B belongs to C (C has many B)
C belongs to D (D has many C)
D belongs to E (E has many D)

in the view of A i would show his parent B, C, D and E
which number should I set A ? (i didn't understood the page about
recursive in the cookbook.)
what is the best way for not include a lot of unusefull data?

thank you
pietro

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive for parents

2009-04-29 Thread brian

On Wed, Apr 29, 2009 at 12:51 PM, fain182 fain...@gmail.com wrote:

 hello,
 i have 5 model related in this way:
 A belongs to B (B has many A)
 B belongs to C (C has many B)
 C belongs to D (D has many C)
 D belongs to E (E has many D)

 in the view of A i would show his parent B, C, D and E
 which number should I set A ? (i didn't understood the page about
 recursive in the cookbook.)

Have you tried 2?

 what is the best way for not include a lot of unusefull data?

Use ContainableBehavior.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive for parents

2009-04-29 Thread fain182

On Wed, Apr 29, 2009 at 4:55 PM, brian bally.z...@gmail.com wrote:

 On Wed, Apr 29, 2009 at 12:51 PM, fain182 fain...@gmail.com wrote:

 hello,
 i have 5 model related in this way:
 A belongs to B (B has many A)
 B belongs to C (C has many B)
 C belongs to D (D has many C)
 D belongs to E (E has many D)

 in the view of A i would show his parent B, C, D and E
 which number should I set A ? (i didn't understood the page about
 recursive in the cookbook.)

 Have you tried 2?
yes, it gives me only A and B...
 what is the best way for not include a lot of unusefull data?

 Use ContainableBehavior.
i will try

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive for parents

2009-04-29 Thread fain182

 Use ContainableBehavior.
 i will try
I read about the containable, but i need the data of all the models...
but i don't think that will help me..
tomorrow maybe i will give you better descrpition of my problem..

thank you
pietro

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive for parents

2009-04-29 Thread brian

On Wed, Apr 29, 2009 at 1:57 PM, fain182 fain...@gmail.com wrote:

 On Wed, Apr 29, 2009 at 4:55 PM, brian bally.z...@gmail.com wrote:

 On Wed, Apr 29, 2009 at 12:51 PM, fain182 fain...@gmail.com wrote:

 hello,
 i have 5 model related in this way:
 A belongs to B (B has many A)
 B belongs to C (C has many B)
 C belongs to D (D has many C)
 D belongs to E (E has many D)

 in the view of A i would show his parent B, C, D and E
 which number should I set A ? (i didn't understood the page about
 recursive in the cookbook.)

 Have you tried 2?
 yes, it gives me only A and B...

Right. I had mixed up the hasMany/belongsTo relationships. I believe
that, if it was the other way around, you'd get all the models.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



recursive in parents

2009-03-11 Thread fain182

my situation is this:
A has many B
B has many C

in the view of C i see only the data of B  and C, i want to see the
data of A too..
i tried to set the recursive to 2 or 3 but it makes something like:
array A
array B that has A
   array A that belongs to B


did you have any suggestion?
thank you

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive in parents

2009-03-11 Thread dr. Hannibal Lecter

A silly guess would be that you didn't set up your B=A relation
properly.

Could you please show us your relations?

Hint: http://bin.cakephp.org/

On Mar 11, 6:39 pm, fain182 fain...@gmail.com wrote:
 my situation is this:
 A has many B
 B has many C

 in the view of C i see only the data of B  and C, i want to see the
 data of A too..
 i tried to set the recursive to 2 or 3 but it makes something like:
 array A
     array B that has A
        array A that belongs to B

 did you have any suggestion?
 thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive in parents

2009-03-11 Thread fain182

mhmm.. i think that's all right with relations... I baked them..

http://bin.cakephp.org/saved/43619



On Wed, Mar 11, 2009 at 9:40 PM, dr. Hannibal Lecter
lecter...@gmail.com wrote:

 A silly guess would be that you didn't set up your B=A relation
 properly.

 Could you please show us your relations?

 Hint: http://bin.cakephp.org/

 On Mar 11, 6:39 pm, fain182 fain...@gmail.com wrote:
 my situation is this:
 A has many B
 B has many C

 in the view of C i see only the data of B  and C, i want to see the
 data of A too..
 i tried to set the recursive to 2 or 3 but it makes something like:
 array A
     array B that has A
        array A that belongs to B

 did you have any suggestion?
 thank you
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive in parents

2009-03-11 Thread dr. Hannibal Lecter

Yes, it seems ok. How do you get your data with find()?

On Mar 11, 10:26 pm, fain182 fain...@gmail.com wrote:
 mhmm.. i think that's all right with relations... I baked them..

 http://bin.cakephp.org/saved/43619

 On Wed, Mar 11, 2009 at 9:40 PM, dr. Hannibal Lecter

 lecter...@gmail.com wrote:

  A silly guess would be that you didn't set up your B=A relation
  properly.

  Could you please show us your relations?

  Hint:http://bin.cakephp.org/

  On Mar 11, 6:39 pm, fain182 fain...@gmail.com wrote:
  my situation is this:
  A has many B
  B has many C

  in the view of C i see only the data of B  and C, i want to see the
  data of A too..
  i tried to set the recursive to 2 or 3 but it makes something like:
  array A
      array B that has A
         array A that belongs to B

  did you have any suggestion?
  thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: recursive in parents

2009-03-11 Thread fain182

sorry.. there was a my fault...
thank you and excuse me ;-)


On Wed, Mar 11, 2009 at 10:51 PM, dr. Hannibal Lecter
lecter...@gmail.com wrote:

 Yes, it seems ok. How do you get your data with find()?

 On Mar 11, 10:26 pm, fain182 fain...@gmail.com wrote:
 mhmm.. i think that's all right with relations... I baked them..

 http://bin.cakephp.org/saved/43619

 On Wed, Mar 11, 2009 at 9:40 PM, dr. Hannibal Lecter

 lecter...@gmail.com wrote:

  A silly guess would be that you didn't set up your B=A relation
  properly.

  Could you please show us your relations?

  Hint:http://bin.cakephp.org/

  On Mar 11, 6:39 pm, fain182 fain...@gmail.com wrote:
  my situation is this:
  A has many B
  B has many C

  in the view of C i see only the data of B  and C, i want to see the
  data of A too..
  i tried to set the recursive to 2 or 3 but it makes something like:
  array A
      array B that has A
         array A that belongs to B

  did you have any suggestion?
  thank you
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---