OK, I guess you do have to save more things than I was hoping for. For
future reference, my updated controller looks like:

            foreach ($this->data['Tag']['Tag'] as $item)
            {
                $this->Tag->create();
                $this->Tag->save(array('Tag' => array('tag' =>
$item)));
                $tag_id[] = $this->Tag->getLastInsertId();
            }

            $this->data['Tag']['Tag'] = $tag_id;

            $this->Image->save($this->data);


By filling the $this->data['Tag']['Tag'] array with the ID's of the
tags we just inserted, then the HABTM *then* fills in the correct
items in the link table.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to