Hello,

I had the same problem and found out a solution :

First, have a look at http://www.symfony-project.org/forum/index.php/m/60712/
where you have an explanation of a potential problem in view $form[id]
should be between tables.
Second, i did the following test to prevent from errors on updating :
    if ($this->getObject()->isNew())
    {
                                $this->validatorSchema->setPostValidator(
                                  new sfValidatorAnd(array(
                                    new sfValidatorPropelUnique(array('model' 
=> 'sfGuardUser',
'column' => array('username')), array('invalid'=>'Un utilisateur avec
le login est déjà enregistré')),
                                    new sfValidatorPropelUnique(array('model' =>
'SfGuardUserProfile', 'column' => array('email')),
array('invalid'=>'Un utilisateur avec cet email est déjà enregistré'))
                                 )));
    }

Hope it helps
Sébastien
epfactory.com

On 26 oct, 18:21, Flancer <[EMAIL PROTECTED]> wrote:
> Based on a the symfony propel:generate-crud command for the
> sfguarduser model, which automagically generates forms that updates
> both the username and password together with the user profile.
>
> I have enabled two unique fields, e-mail and fullname for the user
> profile model.
>
> Whenever I update a record without changing any of the unique field
> values, I would get an error that says an object with the same e-mail
> and fullname already exists.
>
> How can I solve this without getting rid of the
> sfValidatorPropelUnique class?
>
> Has anyone else come across the same issue when working with
> sfguarduserprofile?
>
> Thank you.

--~--~---------~--~----~------------~-------~--~----~
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