In cake 1.2, I have some logic in beforeValidate() to determine the
data going to be saved should be inserted (new record), or updated (by
setting $model->id within beforeValidate()).  Everything works fine.

Now I am migrating to cake 1.3, but it doesn't work anymore.  If I
don't set $model->id to a valid record ID before calling $model-
>save(), then it is always an insert.

I could imagine it is a common problem, but probably I am missing
something, i.e. if beforeValidate() shouldn't be the place to decide
an insert/update, what is the cake way to do it?

Any input?  Appreciate.

--Lapinski

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