Thanks for posting the solution.
Well I've got the same problem! But it looks like you have the fix.
However I can't quite get my head around it because in your example
you refer to $category in
$category["CandidateItem"]["CandidateItem"][$count] = this->Category-
>CandidateItem->getLastInsertI
Finally sorted this for anyone else who has the same problem...
iterate over my array and save each item individually. Get each id of
inserted row and add to new data array and then save Category. This
then creates the associations in the link table.
foreac
Hi,
Can't figure this one out, not for the want of trying though.
Models involved are Category, CandidateItem which are associated in
each model as HABTM. I created a temp baked project to see if the
association definition was correct and it appears to be.
In my categories_controller I have a me
Can you post an example please? When I do $this->Post->save it only
saves Post info and not related Tags ...
Thanks in advance ..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this gr
I got it work now
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For
feelexit, in order to save the data to tags table you must have in the
data returned ($this->data) data relating to the Tag model like this
data['Tag'['Tag'] = array ( 'id' => '1' , 'id' => '2'...)
where ['Tag']['Tag'] contains an array of id's corresponding to tag
id's. You can find more info o
another question is , in the posts with tags example, when I am doing
save, only save post table or posts_tags will be saved as well ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to t
I have 3 tables
tags
resources
resources_tags
in my controller, i use " print_r ($this->data); " to print out data
structure
Array ( [Resource] => Array ( [title] => hhh [description] =>
[user_id] => 1 ) )
it only has data for Resource, there's no data for Tag.
here's my HTML code.