In my application i want to add additional attribute to the owner model through its behaviours
I have a model to which a behaviour is attached i want to add attributes to that model form the behaviour
How to add additional attributes to the model from the attach($owner) method of behaviour
This is my attach method
//how can i add the code for adding additional attribute to the model
public function attach($owner)
{
$owner->metaData->addRelation( 'gallery', array(CActiveRecord::HAS_ONE, 'Gallery', 'principal_id') );
}
parent::attach($owner);
}