CActiveForm + relational query

Hi. I have data separated into two tables (and two models)

with belongs_to relationship in both direcetions.

Is there a way to provide a single CActiveForm to edit the values in both models?

Thanks in advance ;)

Currently my code looks like this:


data => array(self::BELONGS_TO, 'AdditionalData', 'id')


 <?= $form->textArea($model, "data.field1") ?>

Check this wiki - http://www.yiiframework.com/wiki/19/how-to-use-a-single-form-to-collect-data-for-two-or-more-models