I have a model without a db table used to display information that is stored in a session.
I am able to display the content in the session which was loaded from a given table using
$ids = Yii::app()->storedData->getIds();
foreach($ids as $id) {
echo 'ID '.$id .'<br />';
}
Instead of displaying the Ids I would rather display information from a related table of the table from which this info was loaded into the session.
To help explain what I am after, given:
I have ModelC to display session data that is loaded from TableA. Currently with the code above the returned values are TableAId. I would rather display TableB:Description instead. How can I go about doing this without just loading that Description value into the session data too?
In the above code I can retrieve a variable in the session in ModelC by using
$ids = Yii::app()->storedData->getIds();
say this gives me 48 which is TableAId. Instead of getting 48 I want to return the related description which is stored in TableB.