[solved] Extending CActiveRecord


I wanted to add autotimestamps feature to all models, so I’ve created ActiveRecord class

and then make my models extending ActiveRecord instead of CActiveRecord.

But error occured: "The table "ActiveRecord" for active record class "ActiveRecord" cannot be found in the database."

What's the right way to do it?

How are you using your AR classes? It seems you are using ActiveRecord class directly.

Sorry, my bad.

Seems like I’ve deleted public static function model from my models too ))

Now I've returned it to its place and everything is working now.


Damn, now I've removed 'model' method from models (for tests) and everything still works.

Anyway, it's my mistake, I will dig into it. Thanks again.

You don't need model() method for your ActiveRecord class since you won't use "ActiveRecord::model()".