Monday, June 29, 2009

'add' action and auto-setting model id

I have weird (I think) problem. When I've added "add()" action to the
contoller, the id of coresponding model has been set automaticlly to
"add()" method parameter, and when I try to save data using that
action update instead of save is made.

This method singature looks like this:

public function add($someId).

Is it normal behavior? Do I have to manually call "create()" method in
my model if I want to save, not update data?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: