I'm trying to set up a relationship where a serial number can be used
on multiple computers and computers can have multiple serial numbers.
I have a computers_serials table with computer_id and serial_id
columns. In my Computers model I have "var $hasAndBelongsToMany =
'Serial'; " and in my Serials model I have "var $hasAndBelongsToMany =
'Computer';". In my Serials controller I'm getting a list of computers
via "$this->set('computers',  $this->Serial->Computer-
>generateList());" and populating a multi-select in my serials
\edit.thtml with "$html->selectTag('Serial/Computer', $computers,
null, array('multiple' => 'multiple'))".

My edit view doesn't read the initial selection state of the multi-
select from computers_serials or insert data back into that same table
on save. It also doesn't throw an error. I know I'm missing something
but I can't figure out what. I've seen a lot of discussion about this
in the archives, and I've come to understand that if implemented
correctly, Cake should be able to manage these relationships fairly
automatically. I'd appreciate any help I can get.

sn


--~--~---------~--~----~------------~-------~--~----~
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