I've looked at the array I am passing when the post gets entered and
its fine. I am saving correctly using $this->Post and the post data
saves to the post table fine.

My models look like this.

User
var $actsAs = array('Searchable' => array(
                'fields' => array('username', 'first_name',
'last_name', 'location', 'email')
                )
        );

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

Post

var $actsAs = array('Searchable');

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

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

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