title: Javascript object locking?
body: <p>I am running into a strange problem with not being able to update properties on an object that is returned as part of a deferred promise.</p>
  
  <pre><code>// Update or Insert status information into the idr_status table
  this.updateStatus = function (idrInspData, statusId, submitting)
  {
      var def = new $.Deferred();
      self.getIdrStatus (idrInspData.idr_date).done (function (idrStatus)
      {
          //status record exists for the day update record
          idrStatus.status_msg_id = statusId;
          idrStatus.submitted = submitting ? 1 : 0;
          idrStatus.modified = 1;
  
          idrStatus.action_needed = statusId.search('+') != -1 ? true : false;
  
          // update the status
          self.db.updateRecord (self.idrStatusTableName, idrStatus).always (
              function (updateResult)
              {
                  def.resolve(true);
              });
  
      }).fail (function (result)
      {
         def.reject(result);
      });
  
      return (def.promise ());
  }
  </code></pre>
  
  <p>The <strong>idrStatus</strong> object is returned from a SQLite resultset and then converted to a plain JS object then resolved to the done function above. The object comes in but any attempt to edit the properties are simply ignored and the same object is passed <strong>Unchanged</strong> to the <strong>updateRecord</strong> function. I am puzzled? Why would the object be locked?</p>