Thank you Amit, but the same issue arises.

in a saveAll, the fields are not directly at ['model_alias']
['field_name']

so changing it to beforeSave would not help.

I am not sure if i have made myself clear enough.

On Jan 11, 7:36 pm, Amit Badkas <amit.sanis...@gmail.com> wrote:
> Hi,
>
> I think you need to try beforeSave() instead of beforeValidate(), hope it
> may work.
>
> Amit Badkas
>
> PHP Applications for E-Biz:http://www.sanisoft.com
>
>
>
>
>
>
>
> On Tue, Jan 11, 2011 at 5:02 PM, Zeu5 <kimc...@gmail.com> wrote:
> > let say my model Link has 3 fields
> > route, model, action,
>
> > what I want is that route is the combination of model and action.
>
> > eg
> > model = '/orders/view/';
> > action = '3';
>
> > so route is '/orders/view/3';
>
> > i did this in my beforeValidate
>
> > if (isset($this->data['Link']['model']) && isset($this->data['Link']
> > ['action'])) {
> >                        $this->data['Link']['route'] =
> > $this->data['Link']['model'] . $this-
> > >data['Link']['action'];
> > }
>
> > now the problem is when i do a saveAll, this will not work.
>
> > because the data will be
>
> > Array(
> >        [Link] => Array(
> >               [0] => Array(
> >                     [id] => 3,
> >                     [model]=>'/orders/view/',
> >                     [action]=>'3'
> >               )
> >        )
> > )
>
> > Please advise.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.c 
> > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to