Re: Save method not working,working only on inserts

2009-07-03 Thread sajjan
Aah.. [blush] Guess I have showed the true n00b colors.. Works perfectly..Cake is a nice framework again! Thank you Richard,Miles,Paul and Google Groups! On Jul 3, 12:22 am, "rich...@home" wrote: > $this->data['Resource']['ID']=1000; > > should be: > > $this->data['Resource']['id']=1000; > > (M

Re: Save method not working,working only on inserts

2009-07-03 Thread rich...@home
$this->data['Resource']['ID']=1000; should be: $this->data['Resource']['id']=1000; (Models are CapitalisedNoSpaces, fields are all lowercase_underscore) On Jul 3, 6:03 am, sajjan wrote: > Thank you Miles! > > Hmm.. I had tried this and it did not work,but if I put both the lines > below toget

Re: Save method not working,working only on inserts

2009-07-02 Thread sajjan
Thank you Miles! Hmm.. I had tried this and it did not work,but if I put both the lines below together it is working. $this->data['Resource']['ID']=1000; $this->Resource->id = 1000; If I remove any of these the update fails. Thanks so much guys! On Jul 2, 8:39 pm, Miles J wrote: > $this->Res

Re: Save method not working,working only on inserts

2009-07-02 Thread Miles J
$this->Resource->id = 1000; $this->Resource->save() --~--~-~--~~~---~--~~ 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

Re: Save method not working,working only on inserts

2009-07-02 Thread sajjan
m [mailto:cake-...@googlegroups.com] On Behalf > > Of sajjan > Sent: Friday, 3 July 2009 1:38 p.m. > To: CakePHP > Subject: 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 > proble

RE: Save method not working,working only on inserts

2009-07-02 Thread Paul
Don't call Model::create if your saving an existing record...? -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of sajjan Sent: Friday, 3 July 2009 1:38 p.m. To: CakePHP Subject: Save method not working,working only on inserts Hi, I

Save method not working,working only on inserts

2009-07-02 Thread sajjan
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 th