С учетом следующих структур таблицы:
Модель зарегистрированного участника:
<?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')
);
}
?>
Модель местоположения события:
<?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')
);
}
?>
Когда я делаю это на мой взгляд:
echo $ form-> input ('RegisteredParticipant.EventLocation.moderator');
Возвращает выпадающий список EventLocation.id
s, а не EventLocation.moderators
, как я ожидал. Есть идеи, что бы это могло быть?