I think you are looking for something like this: http://www.yiiframework.com/extension/eadvancedarbehavior/
This is an extension that does exactly that you asking.
Quoted from the link:
HAS_ONE and HAS_MANY
Suppose a User HAS_ONE Address and HAS_MANY Emails, and Address/Email BELONGS_TO User (both have the foreignkey column user_id).
So you can do now:
$blog = new Blog();
$blog->author = $author; //the author model object
$blog->references = array( $references1, $references2, ... ) ; //reference model objects
$blog->save();
I think you understand how to setup the forms? Those links you send are pretty clear about it.