Yii relations result non-existing items (cache issue?)

365 Views Asked by At

I have set relations: 'teamDrivers' => array(self::HAS_MANY, 'TeamDriver', 'team_id') in my Team model

So if I want I can: print_r($this->teamDrivers); in my Team. Just for demonstration.

Now the problem is that this kind of code produces a list of items that have already been removed form database! Via CActiveDataProvider with CDbCriteria those items are not reached.

If I log out from my app and then log back in everything seems to be working.

So is there some cache that takes care of those relations or what is this mystery? And how do I clear that cache?

1

There are 1 best solutions below

0
On BEST ANSWER

In my case UserIdentity object had old information and team was got through it. Refreshing was the solutions.