Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-06-04 Thread TimG
Thank you Fain and Jon!!! --~--~-~--~~~---~--~~ 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+unsubsc

Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-20 Thread Jon Bennett
> Hey, thanks for helping with this. Here is my model: > http://bin.cakephp.org/view/1912370055 > > I thought it seemed backwards but users here said it made sense and > that's what bake gave me so I stopped questioning it. Basically, I > have listings, categories and promotions that all have titl

Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-20 Thread fain182
> that's what bake gave me so I stopped questioning it. Basically, I > have listings, categories and promotions that all have titles and > bodies. Do you think that my models are the problem? imho it would be cleaner put the field title and body in all the tables, if there are not title and bodies

Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-19 Thread TGurske
Hey, thanks for helping with this. Here is my model: http://bin.cakephp.org/view/1912370055 I thought it seemed backwards but users here said it made sense and that's what bake gave me so I stopped questioning it. Basically, I have listings, categories and promotions that all have titles and bodi

Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-19 Thread Jon Bennett
Hi, It's a little unclear to me how your associations are set up. Does a Promotion hasMany Title,Body or do Title and Body hasMany Promotion? My suggestions assume the former. > Here is the action: http://bin.cakephp.org/view/994290013 With saveAll, there's no need to manually enter the foreign

Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-19 Thread fain182
> Absolutely: > Here is the action: http://bin.cakephp.org/view/994290013 > Here is the view: http://bin.cakephp.org/view/1805109334 i think you should save the id in the $data array... like: $this->data['Title']['id'] = $current['Promotion']['title_id']; the same for body.. you saveAll($this->da

Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-19 Thread TGurske
Absolutely: Here is the action: http://bin.cakephp.org/view/994290013 Here is the view: http://bin.cakephp.org/view/1805109334 Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this

Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-19 Thread fain182
can you put on bin ( http://bin.cakephp.org/ ) the code of the whole action? and myabe the view? -- pietro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-

Re: saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-19 Thread TGurske
I also tried this: $this->Promotion->title_id = $current['Promotion'] ['title_id']; But it did not work either... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to c

saveAll & Edit - Creates instead of Updating even with passed IDs

2009-05-18 Thread Tim
This passes the ID for the "Promotion" properly but not for the associated title and body: - $this->Promotion->id = $id; // Set the IDs so we update rows instead of creating new ones. $current = $this->Promotion->