delocalizer Brian, I changed the structure of my comments table by changing comment_id to parent_id and used the find('threaded') function to retrieve the data. I also removed the ParentComment and ChildComment associations from the model.
It is now working. Thanks for your help. On Aug 25, 8:23 pm, delocalizer <conrad.leon...@hotmail.com> wrote: > Hi Gerard, > consider using Tree behaviour for your Comments > model?http://book.cakephp.org/view/91/Tree > > On Aug 25, 8:43 pm,gedm<gerard.me...@gmail.com> wrote: > > > Brian, > > > Sorry if I wasn't clear. The problem is the ChildComment User_ID > > doesn't associate with the User Model so I can't get the username > > information for the ChildComments. I jst don't know how to assicate > > the ChildComment model with the User model. I'm sure it's very easy I > > just can't get my head around associating with the ChildComment Class > > when it's not actually a table. I know.... newbie. > > > Gerard > > > On Aug 25, 2:15 am, brian <bally.z...@gmail.com> wrote: > > > > On Sun, Aug 23, 2009 at 9:23 AM,gedm<gerard.me...@gmail.com> wrote: > > > > > Hi, > > > > > I am very new to Cake and have searched for an answer to this but > > > > can't quite get my head around it enough to ask ask the right > > > > question. > > > > I'm not sure you asked anything. What's your question? > > > > The debug array you posted looks ok to me. That is, if $id = 1. Is > > > that the case? Have you reied it with $id = 2? You should see the > > > ParentComment then, and the ChildComment array should be empty. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---