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
> 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
> 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
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
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
> 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
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
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-
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
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->
10 matches
Mail list logo