Revision #3 has been created by balrok on Mar 2, 2012, 5:31:42 PM with the memo:
corrected indention of code
« previous (#2) next (#4) »
Changes
Title
unchanged
Multiple-database support in Yii
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
Database
Content
changed
[...]
self::$dbadvert->setActive(true);
return self::$dbadvert;
}
else
throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.'));
}
}
...
```
This method is **purposely** static: the underlying cached `$dbadvert` value is, so the function may as well be be too. Now, with this helper prepared, we can edit the model itself:[...]