afterFind called twice?

[Mod please delete this post. Duplicate]

I have a model with some processes to be done in afterFind().

Somehow in the update page or the view page, the afterFind() is called twice. (I printed some string, and they came out twice).

I checked the actionUpdate/actionView and they are only called once.

Does anyone know how to trace this or why it might be happening?

Nothing really fatal happens but I don’t think it’s efficient for the processes to be done twice.

My actionUpdate($id) is basic from giix

public function actionUpdate($id) {

		$model = $this->loadModel($id, 'Doc');


		if (isset($_POST['Doc'])) {



			if ($model->save()) {

				$this->redirect(array('view', 'id' => $model->doc_id));



		$this->render('update', array(

				'model' => $model,




and my model afterFind() now just reads

 public function afterFind() {

         print "hello"; 

         return parent::afterFind();


Deleting the parent::afterFind() seems to have no effect.

Thanks for the help guys.

Sorry, I just realized I posted this under the wrong category.

Please ignore

Reposting under the correct forum