Answer the question
In order to leave comments, you need to log in
How to overcome the error "Property not defined"?
When setting the value, an error occurs <<The property "NOrderServiceTransportMedium.product_id" is not defined>>
The field was added to the table manually, through alter table, i.e. not with main generation.
Model class:
class NOrderServiceTransportMedium extends CActiveRecord
{
public function tableName()
{
return 'n_OrderServiceTransportMedium';
}
public function rules()
{
return [
['serv_id, order_num, tr_code, patient, product_id', 'length', 'max' => 200],
['serv_id, order_num, tr_code, patient, product_id', 'safe']
];
}
public function relations()
{
return [
];
}
public function attributeLabels()
{
return [
'id' => 'ID',
'name' => 'Name',
'code_1c' => 'Code 1c',
];
}
public static function model($className=__CLASS__)
{
return parent::model($className);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question