Hi Daniel... Thank you so much!! The problem was that I unset the id field in the form. I did not know that it was supposed to be included in the form because it was present in the URI. I hope this also helps someone else whom faces this problem...
Thanks again... Regards CAP On Mon, Sep 13, 2010 at 2:57 PM, Daniel Lohse <[email protected]>wrote: > You might have forgotten to output $form->renderHiddenFields(false); in > your template? Please check that the ID of your object is there in your edit > screen's HTML. > > Cheers, Daniel > > Sent from my iPhone4 > > On Sep 13, 2010, at 1:58 PM, corneliusparkin <[email protected]> > wrote: > > > Hi > > > > I have been struggling with this functionality for more than a week > > now and really hope someone can help me. > > > > In the doctrine/schema.yml file, I specify a column "code" to be > > unique. i.e. > > code: > > type: string(10) > > fixed: false > > unsigned: false > > primary: false > > default: '' > > notnull: true > > autoincrement: false > > unique: true > > > > When generating a doctrine module i.e. > > symfony doctrine:generate-module admn category_management Category > > > > the following code is inserted into the BaseCategoryForm->setup > > function "which according to my understanding is the correct way of > > implelentingt the solution" > > > > $this->validatorSchema->setPostValidator( > > new sfValidatorDoctrineUnique(array('model' => 'Category', > > 'column' => array('code'))) > > ); > > > > When I create a new category, it adds successful. Then, if I try to > > create a new category with the same "code", it gives an error to state > > the the category already exists "which is correct". > > However, if I try update the category and keep the "code" the same, I > > receive an error "An object with the same "code" already exist." > > > > If someone can PLEASE help me resolve this problem, I will be most > > thankful. > > > > Regards > > CAP > > > > -- > > 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]<symfony-users%[email protected]> > > For more options, visit this group at > > http://groups.google.com/group/symfony-users?hl=en > > -- > 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]<symfony-users%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- Warm Regards C.A.Parkin *~"When you innovate, you've got to be prepared for everyone telling you you're nuts" - Larry Ellison~* -- 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
