Sorry, I was too quick to jump the gun, this never get's called, using
rawSet is the only working solution I have found.
ublic function setFilePath($value)
{
// your logic
$this->rawSet('file_path', $value); // not camelized!
}
On 1/8/08, Karolis Tamutis <[EMAIL PROTECTED]> wrote:
>
> To anyone who's facing a similar problem:
>
> for example you want a custom setter for a field file_path in Doctrine.
>
> Open up the generated model class and add a following method:
>
> public function filterSetFilePath($value)
>
> {
>
> return $modifiedValue;
>
> }
>
> now $modifiedValue will be saved in the database instead of $value, hope
> it helps!
>
> On 1/6/08, Karolis Tamutis <[EMAIL PROTECTED]> wrote:
> >
> > Hi everyone, with Propel, models had set* methods in autogenerated
> > classes, so when you needed to extend some method, you'd just do
> >
> > public function method($val)
> >
> > {
> >
> > parent::method($val);
> >
> > // whatever goes here
> >
> > }
> >
> > but with Doctrine, there is _no_ parent::method, so, how do I execute
> > someting on-save of a specific row?
> >
> > Thanks!
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---