Hi

On 26 авг, 22:34, cronet <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I read the manual article, but there are still some questions.
>
> 1) If I define a hasOne relationship.The manual says: If I set
> 'dependent' to true, the associated row is also deleted.
> But what happens contrariwise?
>
> If I create a row in the User table, will the UserProfile (with no
> data except the user_id) also be created?

No, it won't;

> 2) How to organize my file structure?
> e.g. I edit user data in /users/edit  ...
> Should I modify the associated UserProfile in /UserProfiles/edit or
> could I simply create a new user action ( /users/edit_profile )?

Both variants are possible. You can specify that the UserController
can use both models by setting var uses = array ('User',
'UserProfile');
And then you can access it with $this->UserProfile just like $this-
>User

> Greetings,
> Alexander


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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