0
我讀了你的回答關於cakephp model alias,我在我的模型上做了你寫的東西,我抨擊了我的觀點,並列出我想要的東西,但它沒有顯示列表各自的領域,你有什麼想法是什麼錯?CakePHP模型別名的作品,但視圖不顯示
我的模型:
'ResponsavelManutencao' => array(
'className' => 'Operador',
'foreignKey' => 'responsavel_manutencao_id',
'conditions' => '',
'fields' => '',
'order' => '')
我的控制器:
function add(
$responsavelManutencao = $this->Dentista->ResponsavelManutencao->find('list');
$this->set(compact('responsavelManutencao'));)
我的觀點:
echo $this->Form->input('responsavel_relacionamento_id', array(
'class' => 'field text small', 'empty' => '',
'after' => 'Funcionario responsavel por manter o contato comercial.'));
debug($responsavelRelacionamento);
您使用的第一responsavel_manutencao並在視圖responsavelRelacionamento?自動填充通常適用於$ this-> data – api55
對不起api55,我粘貼了錯誤的代碼,但是nanoman回答了我的問題,謝謝。 – paulodealmeida