0
I am 3 days banging head with a problem: I have some tables in the system and this error happens on the most unlikely screens.
I’ll give you the latest example:
2015-03-13 16:37:51 Error: [pdoexception] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Cadrepresentante.id' in 'field list' Request URL: /Lhasa/auxiliar/situacao_banco/edit/18
#8 C: xampp htdocs Lhasa app Controller Situacaobancocontroller.php(87): Model->read(NULL, '18')
#9 [Internal Function]: Situacaobancocontroller->auxiliar_edit('18')
The Auxsituacaobanco table has $hasMany connection with Cadproposta, but no connection with Cadrepresentante! If I remove the link with Cadproposta in the model of Auxsituacaobanco, stop giving the editing error, but ai in Cadproposta that, has link $belongsTo, begins to give error of Auxsituacaobanco.
I don’t know what else to do to solve this problem!
Auxsituacaobanco:
public $hasMany = array(
'CadProposta' => array(
'className' => 'CadProposta',
'foreignKey' => 'aux_situacao_banco_id',
)
);
Cadproposta
public $belongsTo = array(
...
'AuxSituacaoBanco' => array(
'className' => 'AuxSituacaoBanco',
'foreignKey' => 'aux_situacao_banco_id',
),
...
);