Cactivedataprovider Is Not Returning All The Items On The Db

Hello, I am having the following problem: I have 2 controllers PersonController and SiteController, both have the same CActiveDataProvider


$dataProvider = new CActiveDataProvider ('Person');

but the site controller is returning me less results than the person.

PersonController.php




public function actionIndex($id_category)

	{

									

		if ($id_category!=='*')

		{

		    $dataProvider = new CActiveDataProvider ('Person', array ( 

		    'criteria' => array ( 

		    'condition' => '(id_category = '.$id_category.') AND (id_state IN(1,3,4))' ,

		    ),

				));

		

		}else

		{

			$dataProvider = new CActiveDataProvider ('Person');

			

			}

			

			$dataProvider->pagination->pageSize=50;

			

			

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

			'dataProvider'=>$dataProvider,

		));

	}



SiteController.php




public function actionIndex()

	{

		// renders the view file 'protected/views/site/index.php'

		// using the default layout 'protected/views/layouts/main.php'

		

		$category = Category::model()->findAll();

		

		$dataProvider = new CActiveDataProvider ('Person');

				

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

			'dataProvider'=>$dataProvider,

			'category'=>$category,

		));

		

	}



Im checking in the index view using this command:


echo'Cuenta provider: '. count($dataProvider->data).'</br>';



i am getting 10 items and in the other index view i am getting 19. any clue ? I will appreciate it.

in one action you set


$dataProvider->pagination->pageSize=50;

while in other - you do not. By default page size is 10 items. getData() (which is called when you access "data") returns always only current page, not all records.