Thursday, July 2, 2009

Save method not working,working only on inserts

Hi,

I have read a lot of posts on this topic but am not able solve my
problem.I am new to to CakePHP so please help!

My model name is Reource.
controller code:
{
:
:
$this->data['Resource']['ID']=1000 // this is a valid ID in the table
of an existing record,i have hardcoded for now to isolate the problem
:
$this->Resource->create();
$this->Resource->save($this->data);
:
:
}

This works if, instead of 1000 i give a new ID it inserts perfectly.


Please help!
Thanks in advance!
Sajjan Sarkar


--~--~---------~--~----~------------~-------~--~----~
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: