Hi all,

Apologies in advance if I have missed a solution to this or something
obvious.

I am setting up a Blog site and I have specified posts, comments and
users then used the console to generate my models, controllers and
views.

This has given me the following code in posts model:


var $hasMany = array(
                'Comment' => array(
                        'className' => 'Comment',
                        'foreignKey' => 'post_id',
                        'dependent' => true,
                        'conditions' => '',
                        'fields' => '',
                        'order' => '',
                        'limit' => '',
                        'offset' => '',
                        'exclusive' => '',
                        'finderQuery' => '',
                        'counterQuery' => ''
                )
        );


        var $belongsTo = array(
                'User' => array(
                        'className' => 'User',
                        'foreignKey' => 'user_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                )
        );

but when I view the array from the index view for posts (with a
comment existing) I only get Posts and Users, with no mention of
Comments.

Is there a reason for this?

Andy

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 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

Reply via email to