I have the following models:

Users (id, name, ...)
Preferences (id, user_id, ...)

With the relationships "User hasOne Preference" and "Preferences
belongsTo User" set in each model.

I created a form with all fields for either users and preferences.

$form->create('User',Array('action' => 'register'));
$form->input('User.name');
/*...*/
$form->input('Preference.country');
$form->input('Preference.gui_skin');
/*...*/
$form->end('Create User');

In the model, I have

function register () {
        $this->User->recursive = 1;
        $this->save($this->data);
}

Altought, in the above save call, the data is saved only in the User
model, Is there a way for perform the save recusive, namely, that the
User::save create recursively the asociated Profile too?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to