Creating relation in yii modelbut getting error:
'hotelconfirmdata' => array(self::HAS_MANY, 'HotelConfirm', 'hotel_code', array('condition'=>" hotel_type='voca_rental' AND hotel_code=ID "))
Error:Property "CHasManyRelation.0" is not defined
Need Help
关系定义已经是一个数组,因此您不应将其他参数包装在数组中:
'hotelconfirmdata' => array(self::HAS_MANY, 'HotelConfirm', 'hotel_code', 'condition' => " hotel_type='voca_rental' AND hotel_code=ID ")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.