If you are using doctrine then you need to do it like this:
$this->_set('password', sha1($password);
And yes, you can define a column as unique in your schema.yml file:
"unique: true" (this will automatically add the unique index).
On Jan 11, 7:24 pm, Darren884 <[email protected]> wrote:
> Hello, I am having trouble with the following:
>
> I am trying to override my setPassword method for my employee model
> but everytime I try to overwrite it I get nothing from it. I was
> using:
>
> public function setPassword($password)
> {
> parent::setPassword(sh1($password));
> }
>
> Also is it possible to define that a column in the doctrine YAML
> should be unique? And also is it possible to define a MySQL function
> on a column?
>
> Thank You,
> Darren
--
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.