Retrieving models without getting associated models - CakePHP

I use the find('all') function to retrieve the post records from my database, but this will also return all the User information that is associated with the Post model with a belongsTo - hasMany relationship.

The downside of this is that the user model contains password and other important information. Is this considered a security issue? I am nowhere echo-ing the information on the view.

Thanks


EDIT:

I modified my code but I am still getting the associated models.

        $this->set('posts_list',$this->Post->find('all',array('contain' => false, 'order' => array('Post.price ASC'))));

Any ideas?

9
задан AlexBrand 7 April 2011 в 20:06
поделиться