Problem with FIle Upload while updating content

Model Code

public function rules()

  {

      return array(

                array('product_image', 'file', 'allowEmpty' => true),

             

      );

  }

With This RULE applied, only product_image attribute changes. Any modification to other attributes stay same… Is it a bug or am i doing something wrong

Sorry the rule i was using is

array('product_image', 'file', 'allowEmpty' => false),

This only allows the "product_image" attribute of model (Active Record) to update if change. Other attributes changed from Form are not updated in database.

…Controller CODE

public function actionCreateProduct()

{


	$this->layout = "productmanagement_layout";


	$product=new product;


	$category = new category;


	if(isset($_POST['product']))


	{


		$product->attributes=$_POST['product'];


		$product->product_image=CUploadedFile::getInstance($product,'product_image');





		if($product->save()){


			$product->product_image->saveAs("images/product/$product->product_image");


			$this->redirect(array('ListProduct'));


		}


	}


	$this->render('CreateProduct',array('product'=>$product));


}

Are other attributes listed in safeAttributes() of the model?