You can set an index on doctrine models and make the index unique.. http://www.doctrine-project.org/documentation/manual/1_0/en/defining-models:indexes:index-options
<http://www.doctrine-project.org/documentation/manual/1_0/en/defining-models:indexes:index-options>If you want to make some sort of validator that checks to see if what you typed already exists, there is some validator out there called sfValidatorUsernameUnique or something which you can look at and probably make it work for you. I think there is an email one too. Check the API. Word On Thu, Nov 18, 2010 at 12:43, Ardison Nicolas <[email protected]>wrote: > Hi folks, > I have a table table with Doctrine where i have an numeric id as a key and > an email, the email must be unique (as the key), i know that i can write the > code to do it at the create method when i insert the data in the SQL. But i > want to know if doctrine have something to do it editing the base of the > model or of the form in the lib. > > Cheers! > > -- > Nicolas G. Ardison > [email protected] > > Antes de imprimir este mensaje, asegúrese de que es necesario. El medio > ambiente está en nuestras manos. > Before printing, think about the environment. > > -- > 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 > -- Alex Pilon (613) 608-1480 -- 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
