I am using Giix extension in yii . It is working great . Now i am getting trouble with save data which have 1 to many relation with the other table.
in model BaseProduct we have
'relatedProducts' => array(self::HAS_MANY, 'RelatedProduct', 'product_id'),
in view
<?php $this->widget('ext.Chosen.Chosen',array(
'name' => 'Product[relatedProducts]',
'value' => $model,
'data' => GxHtml::listDataEx( Product::model()->findAllAttributes(null, true)),
'disableSearch' => false,
'htmlOptions'=> array('class'=>'form-control','style'=>'width:400px;','multiple'=>true),
));
; ?>
in controller
$model->saveWithRelated($relatedData)
now my question is , is Giix has the ability to save related data for HAS_ONE relation ? or i can write code for myself ?