I have two models which inherits from the common base class.
class Batsmen extends CPlayer{
batsmen_id // model field.
batsmen_name // model field.
}
class Bowler extends CPlayer{
bowler_id // model field.
bowler_name // model field.
}
// Component class which serves as a base class for models batsmen and bowler models.
class CPlayer extends CActiveRecord{
public player_id;
public player_name;
}
I want to load the attribute values of Batsmen/Bowler to the base class CPlayer attributes while loading an object or after creating an object of Batsmen or Bowler. How can i do this?