Cakephp. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'CalendarsClassification.id' in 'field list'
<p>When I delete a classification, I get this error</p>

<pre><code>Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'CalendarsClassification.id' in 'field list'

SQL Query: SELECT `CalendarsClassification`.`id` FROM `calendars_classifications` AS `CalendarsClassification` WHERE `CalendarsClassification`.`calendar_id` = 221
</code></pre>

<p><code>CalendarsClassification</code>.<code>id</code> does not exist, but I do not know how to change it. </p>

<p>ClassificationsController</p>

<pre><code>    public function delete($id = null) {        
    if (!$id) {
        $this-&gt;flash(__('Invalid Classification', true), array('controller'=&gt;'clients','action'=&gt;'index'));
    }
    $this-&gt;request-&gt;data = $this-&gt;Classification-&gt;read(null, $id);
    if ($this-&gt;Classification-&gt;delete($id, true)) {
        $this-&gt;flash(__('Classificació esborrada.', true), array('controller'=&gt;'blocks','action'=&gt;'view',$this-&gt;data['Classification']['block_id']));
    }
}
</code></pre>

<p>Model Classification</p>

<pre><code>class Classification extends AppModel {

var $name = 'Classification';
var $validate = array(
    'long_name' =&gt; array(
        'rule' =&gt; array('minLength', 1)
    )
);

//The Associations below have been created with all possible keys, those that are not needed can be removed
var $belongsTo = array(
        'Block' =&gt; array('className' =&gt; 'Block',
                            'foreignKey' =&gt; 'block_id',
                            'conditions' =&gt; '',
                            'fields' =&gt; '',
                            'order' =&gt; ''
        )
);
var $hasMany = array(
        'Line' =&gt; array('className' =&gt; 'Line',
                            'foreignKey' =&gt; 'classification_id',
                            'conditions' =&gt; '',
                            'fields' =&gt; '',
                            'order' =&gt; '',
                            'limit' =&gt; '',
                            'offset' =&gt; '',
                            'dependent' =&gt; true,
                            'exclusive' =&gt; '',
                            'finderQuery' =&gt; '',
                            'counterQuery' =&gt; ''
        )
);

var $hasAndBelongsToMany = array(
        'Calendar' =&gt; array('className' =&gt; 'Calendar',  
                       'joinTable'    =&gt; 'calendars_classifications',
                       'foreignKey'   =&gt; 'calendar_id',
                       'associationForeignKey'=&gt; 'classification_id',
                       'conditions'   =&gt; '',
                       'fields' =&gt; '',
                       'order'        =&gt; '',
                       'limit'        =&gt; '',
                       'unique'       =&gt; true,
                       'finderQuery'  =&gt; '',
                       'deleteQuery'  =&gt; '',
         )
 );
</code></pre>

<p>}</p>