내 테이블 'delivery_state'에 새 열을 추가했습니다.모델 yii 프레임 워크에 새 속성을 추가하는 방법은 무엇입니까?
yii 프레임 워크에서 사용하고 있습니다.
나는 두 함수 규칙과 속성이 'delivery_state'을 추가 한하지만 난 오류 메시지 속성 delivery_state가 정의되어 있지 얻었다 기능을
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('buyer_id, seller_id, lta_product_id, currency_id, order_date, delivery_date, payment_date', 'required'),
array('seller_id, currency_id', 'numerical', 'integerOnly'=>true),
array('buyer_id, lta_product_id, quantity', 'length', 'max'=>11),
array('unitary_price, total_price', 'length', 'max'=>10),
array('delivery_title, delivery_address,delivery_state, delivery_city, delivery_country_id', 'length', 'max'=>255),
array('delivery_zip', 'length', 'max'=>16),
array('phone_number', 'length', 'max'=>24),
array('notes', 'length', 'max'=>1024),
array('status', 'length', 'max'=>1),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('id, buyer_id, seller_id, lta_product_id, quantity, unitary_price, total_price, currency_id, order_date, delivery_date, payment_date, delivery_title, delivery_address,delivery_city, delivery_zip, delivery_country_id, phone_number, notes, status', 'safe', 'on'=>'search'),
);
}
public function attributeLabels()
{
return array(
'id' => 'Id',
'buyer_id' => 'Buyer',
'seller_id' => 'Seller',
'lta_product_id' => 'Lta Product',
'lta_contract_id' => 'Lta Contract',
'quantity' => 'Quantity',
'unitary_price' => 'Unitary Price',
'total_price' => 'Total Price',
'currency_id' => 'Currency',
'order_date' => 'Order Date',
'delivery_date' => 'Delivery Date',
'payment_date' => 'Payment Date',
'delivery_title' => 'Delivery Title',
'delivery_address' => 'Delivery Address',
'delivery_state' => 'Delivery State',
'delivery_city' => 'Delivery City',
'delivery_zip' => 'Delivery Zip',
'delivery_country_id' => 'Delivery Country',
'phone_number' => 'Phone Number',
'notes' => 'Notes',
'status' => 'Status',
'buyer_quota' => 'Buyer Quota',
'seller_quota' => 'Seller Quota',
);
}
다음의이 같은 모델이 'delivery_state'을 추가했습니다. 내가 잘못
너희들이 나에게 제안 주실 래요 ....
또는 내가 정의 실종 아무것도 ..
감사 main.php
파일 'schemaCachingDuration'에 대한
main.php 파일에는 schemaCachingDuration이 없습니다. –