I am unable to get the list box to display for my HABTM relationship between requests table and services table. I have created a requests_services join table with the ids from both original tables and the query that the bottom of the screen completes fine (SELECT `Service`.`id`, `Service`.`name` FROM `services` AS `Service` WHERE 1 = 1 ). I am not sure what else to do, except code it out, but I was hoping for the scaffolding to work. Please help.
/models/request.php class Request extends AppModel { var $name = 'Request'; var $belongsTo = array('State'); var $hasAndBelongsToMany = array( 'Service'=>array('className'=>'Service', 'joinTable'=>'requests_services', 'foreignKey'=>'request_id', 'associationForeignKey'=>'service_id', 'unique'=> true, 'with'=>'RequestsServices') ); } /models/service.php class Service extends AppModel { var $name = 'Service'; var $hasAndBelongsToMany = array( 'Request'=>array('className'=>'Request', 'joinTable'=>'requests_services', 'with'=>'RequestsServices') ); } /controllers/requests_controller.php class RequestsController extends AppController { var $name = 'Requests'; var $scaffold; } --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---