The exact line to add to your post model is:
var $hasMany = array('Comments');And yep it is that easy :) As for the error - when you turned debug on up to 2 do you get a Controller missing action or something like that? Geoff On 8/3/07, Dan Soendergaard <[EMAIL PROTECTED]> wrote: > > > > This usually indicates that either mod_rewrite is not working or you > > have fiddled with your paths in config/core.php > > mod_rewrite is working as far as I can see. Also, since I can navigate > to /posts/ without any problem, there must be some other cause. Oh, I > sorted it out by turning on debugging. There was a couple of errors > with the database query which made it go wrong. > > > Post hasMany Comments > > $data = $this->Post->read($postId); > > The first line goes into the Post model and the second line goes into > the Post view, right? > If it really is that easy I'm never going to code plain PHP again! > > Thanks a lot, > > Dan > > > > > -- http://lemoncake.wordpress.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
