I have created a Blog Application using a base table as 'Posts'. Later Model-Associated with another table 'Users' with 'belongsTo' relationship like below in the MODEL
var $belongsTo = array( 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); But still I am not able to store the UserId in the Posts Table ??? What's the Problem Plus what does the following lines of code mean :: I saw the comments_controller.php which got generated using the BAKE command when MODEL ASSOCIATED the 'Posts' table with the 'Comments' Table : $posts = $this->Comment->Post->find('list'); $this->set(compact('posts')); If not above ; is there anyway I can store the UserId in the Posts Table using Model Associated cakePHP application ? 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