[SOLVED] Adjust AR (table) metadata

Hi all,

Is there a way to adjust/correct table metadata after it’s been loaded from the database?

For example, an AR based on a view cannot have a primary key, although the key does exist (on the main table of the view). So can I override the primary key for instance? If yes, which AR’s method should I override?

Use the CActiveRecord::primaryKey() method to override the used primary key.