title: how to change the primarykey manually on the YII 2 model
body: <p>I tried to use this way, but the result is not complete column name.</p>
  
  <pre><code>class VMaterial extends \yii\db\ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'v_material';
      }
  
  
      /**
       * @inheritdoc$primaryKey
       */
      public static function primaryKey()
      {
          return "id";
      }
  </code></pre>
  
  <p>RESULT :</p>
  
  <blockquote>
    <p>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'i' in 'where
    clause' The SQL being executed was: SELECT * FROM <code>v_material</code> WHERE
    <code>i</code>='8'</p>
  </blockquote>