edek
(Savailonei)
1
static CActiveRecord::model method - should I override it in SECOND derived class?
Example:
The inheritance hierarchy is like that: CActiveRecord -> MyClass1 -> MyClass2
Should I override the method in MyClass2? My guess is no, please confirm.
Thanks in adv.
gusnips
(Gustavo)
2
Yes, you do
when you call myModel::model it will get/create an instance of the model based on the value of the parameter of "model" method
So lets say you dont override in "MyClass2" class, when you get it using MyClass2::model it will return an instance of "MyClass1"
edek
(Savailonei)
3
Thanks Gustavo, I’ll do as you say ![:)](http://www.yiiframework.com/forum/public/style_emoticons/default/smile.gif)