I had the same issue early on, and while there's an easy fix, it's still quite a gotcha if you're not ready for it. This is technically a feature, not a bug...
Cake assumes that the first parameter of a method is the primary key, even if you give it a different name. That's why it's doing an update (on the record with that id), and that's why putting id in a get variable works (because cake doesn't pay attention to those). I've talked with gwoo about getting this fixed, but... it's a lot harder to get a feature changed than a bug fixed. :-) The simple answer for me was to manually set $this->Model->id to null at the beginning to my function. It's probably better to call Model->create() at the beginning, though, because it both sets id to null, and clears any data that might have found it's way into the model. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---