title: CakePHP 3 - 1054 Column not found
body: <p>I have Two tables: cars and car_types. Cars "hasOne" type and Type "hasMany" cars. I've defined this constraints in my models but how can I read the values inside my controller or view without getting the error message like below? </p>
  
  <p>Mysql error message: </p>
  
  <blockquote>
    <p>"Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column
    'CarTypes.type_id' in 'on clause'" </p>
  </blockquote>
  
  <p>I got this error when I do this inside my CarsController: </p>
  
  <pre><code>public function index() {
     $query = $this-&gt;Cars-&gt;find('all', ['contain' =&gt; [
          'CarTypes'
     ]]);
  
     debug($query-&gt;toArray());
  }
  </code></pre>
  
  <p><strong>Cars table:</strong></p>
  
  <pre><code>id - type_id - method_id
  </code></pre>
  
  <p><strong>Car_types table:</strong></p>
  
  <pre><code>id - type
  </code></pre>
  
  <p><strong>CarTypes model:</strong></p>
  
  <pre><code> public function initialize(array $config)
      {
          parent::initialize($config);
  
          $this-&gt;setTable('car_types');
          $this-&gt;setDisplayField('id');
          $this-&gt;setPrimaryKey('id');
  
          $this-&gt;hasMany('Cars', [
              'foreignKey' =&gt; 'type_id'
          ]);
      }
  </code></pre>
  
  <p><strong>Cars model:</strong></p>
  
  <pre><code>public function initialize(array $config)
      {
          parent::initialize($config);
  
          $this-&gt;setTable('cars');
          $this-&gt;setDisplayField('id');
          $this-&gt;setPrimaryKey('id');
  
          $this-&gt;hasOne('CarTypes', [
              'className' =&gt; 'Cars.CarTypes',
              'foreignKey' =&gt; 'type_id',
              'propertyName' =&gt; 'type'
          ]);
      }    
  </code></pre>