title: Rails ActiveRecord Mysql2::Error: Unknown column 'objectname.'
body: <p>I have an update to an existing MySQL table that is failing under Rails.  Here's the relevant controller code:</p>
  
  <pre><code>on = ObjectName.find_by_object_id(params[:id])
  if (on) #edit existing
    if on.update_attributes(params[:param_type] =&gt; params[:value])
      respond_to do |format|
        ...
  end
  </code></pre>
  
  <p>The ObjectName model class has 3 values (object_id, other_id, and prop1).  When the update occurs, the SQL generated is coming out as </p>
  
  <pre><code>UPDATE `objectname` SET `other_id` = 245 WHERE `objectname`.`` IS NULL
  </code></pre>
  
  <p>The <code>SET</code> portion of the generated SQL is correct.  Why is the <code>WHERE</code> clause being set to <code>.`` IS NULL</code> ?</p>