Well, what do you want it to do? My solution is not to let the user change the primary key. Perhaps you should have a hidden field for the original PK, so you can remove it when you save the new one. But letting the user modify the PK gives them the power to overwrite any other entry, which is asking for trouble...
[EMAIL PROTECTED] wrote: > If you allow user to change the table's primary key from a form and you > use $this->modelname->save($this->params['data'])) in controller ,there > will be a new record has the new PK value apprears,but the old one > stills there,how to avoid that? > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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/cake-php -~----------~----~----~----~------~----~------~--~---
