Given the following table structures:
Registered Participant model:
<?php
class RegisteredParticipant extends AppModel {
var $name = "RegisteredParticipant";
var $primaryKey = "id";
var $belongsTo = array(
'EventLocation' => array('className' => 'EventLocation'),
'RegistrationStatus' => array('className' => 'RegistrationStatus'),
'Specialty' => array('className' => 'Specialty')
);
var $hasMany = array(
'DietaryRestriction' => array('className' => 'DietaryRestriction')
);
}
?>
Event Location model:
<?php
class EventLocation extends AppModel {
var $name = 'EventLocation';
var $primaryKey = 'id';
var $belongsTo = array(
'Event' => array('className' => 'Event', 'foreignKey' => 'event_id'),
'Location' => array('className' => 'Location', 'foreignKey' => 'location_id')
);
}
?>
When I do this in my view: echo $form->input('RegisteredParticipant.EventLocation.moderator');
It returns a dropdown list of the EventLocation.id
s, not the EventLocation.moderators
like I expected. Any ideas what it could be?