title: Using save() function on a Model without a primary key in produces an error
body: <p>I've encountered an unusual error when using the save() function of Laravel. This is the error:</p>
  
  <pre><code>SQLSTATE[42601]: Syntax error: 7 ERROR:  zero-length delimited identifier at or near """"
  
  LINE 1: ...pdate "t_h_ledger_sheet" set "o_memo1" = $1 where "" is null
                                                                ^ (SQL: update "t_h_ledger_sheet" set "o_memo1" = 1234 where "" is null)
  </code></pre>
  
  <p>Can somebody know what caused this and what can be done to fix this? Here's my Model:</p>
  
  <pre><code>&lt;?php
  namespace App\Model;
  
  use Illuminate\Database\Eloquent\Model;
  
  class LedgerSheet extends Model
  {
      protected $table = 't_h_ledger_sheet';
      protected $primaryKey = null;
      public $incrementing = false;
      public $timestamps = false;
  }
  </code></pre>
  
  <p>Is having no primary key causing the error?</p>
  
  <p>EDIT: Here's what I did. Also an additional detail, This table must only contain 1 row of data</p>
  
  <pre><code>$memos = LedgerSheet::first();
  
  if ($memos == null) {
      $memos = new LedgerSheet;
  }
  
  $o_memo1 = "ASDF";
  $o_memo2 = "ASDF";
  $o_memo3 = "ASDF";
  $o_memo4 = "ASDF";
  $o_memo5 = "asdf";
  $o_memo6 = "asdf";
  $o_memo7 = "asdf";
  $o_memo8 = "asdf";
  
  DB::transaction(function() use($memos, $o_memo1, $o_memo2, $o_memo3, $o_memo4, $o_memo5, $o_memo6, $o_memo7, $o_memo8) {
  
      $memos-&gt;o_memo1 = $o_memo1;
      $memos-&gt;o_memo2 = $o_memo2;
      $memos-&gt;o_memo3 = $o_memo3;
      $memos-&gt;o_memo4 = $o_memo4;
      $memos-&gt;o_memo5 = $o_memo5;
      $memos-&gt;o_memo6 = $o_memo6;
      $memos-&gt;o_memo7 = $o_memo7;
      $memos-&gt;o_memo8 = $o_memo8;
  
      try{
         $memos-&gt;save();
      }catch(\Exception $e){
         error_log($e-&gt;getMessage());   // insert query
      }
  
  });
  </code></pre>
  
  <p>2ND EDIT REMOVING THE transaction wrap:
      $memos = LedgerSheet::first();</p>
  
  <pre><code>if ($memos == null) {
      $memos = new LedgerSheet;
  }
  
  $memos-&gt;o_memo1 = "ASDF";
  $memos-&gt;o_memo2 = "ASDF";
  $memos-&gt;o_memo3 = "ASDF";
  $memos-&gt;o_memo4 = "ASDF";
  $memos-&gt;o_memo5 = "asdf";
  $memos-&gt;o_memo6 = "asdf";
  $memos-&gt;o_memo7 = "asdf";
  $memos-&gt;o_memo8 = "asdf";
  
  try{
      $memos-&gt;save();
  }catch(\Exception $e){
      error_log($e-&gt;getMessage());   // insert query
  }
  </code></pre>
  
  <p>EDIT: <strong>It is impossible to use the save() function on a Model without a primary key.</strong></p>