Having 2 Models With One To Many Relation In A Single Form

I’ve two model, let’s called them Order and OrderLine,

what is the common way to interact with these models in a form using Yii ?

is there any widget that enable us to do so ?

thanks :)


create relation between both table with one_many relation

Indeed, AR Relations are awesome, read more: http://www.yiiframework.com/doc/guide/1.1/en/database.arr

Later, also read more advanced relational options as very good explained by Softark here: http://www.yiiframework.com/wiki/428/drills-search-by-a-has_many-relation/