I have the following scenario:
My model "User" has a MANY_MANY relation named "friends" (related models are also "User" models)
So:
$friendsArrDataProvider = new CArrayDataProvider($model->friends);
$items_no1 = count($friendsArrDataProvider->getData()); //here 11;
$friendsActiveDataProvider = new CActiveDataProvider("User", array(
'data' => $model->friends,
));
$items_no2 = count($friendsActiveDataProvider->getData()); //here 212 ?!?!?
I expected $items_no2 and $items_no1 to have the same value but it seems that CActiveDataProvider attribute totalItemCount is not updated related to the given data (I`m wrong?)
Any explanation will be great!