HI, Vaibhav Rajput

It think that you need to embed your UserProfile form in UserForm. In order
to do that, you need to

1. In your schema:

>
> User:
>
 columns:

       id: { type: integer, primary: true,  autoincrement: true }

>    username: { type: string(255), notnull: true, unique: true }
>    password: { type: string(255), notnull: true, unique: true }
>
    relations:
      UserProfile: {local: id, foreign: user_id,* type: many*}

>
> UserProfile:
>  actAs:         { Timestampable: ~ }
>  columns:
>    user_id:     { type: integer, notnull: true }
>    name:        { type: string(255) }
>    phonenumber: { type: string(255), notnull: true }
>    photo:       { type: string(255) }
>    email:       { type: string(255) }
>  relations:
>    User:        { onDelete: CASCADE, local: user_id, foreign: id,
> foreignAlias: UserProfile }
>


*type:* indicates one to many relation.

2. doctrine:build --all

3. In your UserForm:
$userProfile = new UserProfileForm($this->getObject->getUserProfile());
            $this->embedForm('profile', $userProfile );


4.Done.

Cheers.


Erkhembayar Gantulga

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" 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/symfony-users?hl=en

Reply via email to