title: having my entityState to become Unchanged if undoing the only modification in my entity
body: <p>I am working with Breezejs. Lets' say I have an observable entity <code>dummy</code> filled with some data. The user modified the <code>description</code> property of this entity through an input box on the html page. It is possible that the user also modified other properties of this entity on other input boxes on the page. The entityState of my entity is <code>Modified</code> at this time. Next I perform some checks and need to undo <strong>only modifications on this <code>description</code> property by code</strong>.</p>
  
  <p><strong>If this is the only modification</strong> then I would like to have my entityState to become <code>Unchanged</code></p>
  
  <p><strong>If there are other modifications</strong> on this entity then I would like to keep them as is and only <em>undo</em> the <code>description</code> property.</p>
  
  <p><strong>Why do I need that?</strong> When there are some pending modifications on the page, I display the <code>Save</code> and <code>Cancel</code> buttons. If there is only 1 modification and I undo it, then this is not logic to have <code>Save</code> and <code>Cancel</code> buttons enabled.</p>
  
  <p>Is it possible?</p>
  
  <p>Thanks.</p>
  
  <hr>
  
  <p>UPDATE</p>
  
  <p>Here is my actual implementation:</p>
  
  <pre><code>private tryReject() {
      // if any modified values are the same as original values &gt;&gt; reject
      var rejectPossible = true;
      for (var name in this.dummy().entityAspect.originalValues) {
          var oldVal = this.dummy().entityAspect.originalValues[name];
          var newVal = this.dummy()[name]();
          if (oldVal != newVal) rejectPossible = false;
      }
      if (rejectPossible) this.dummy().entityAspect.rejectChanges();
  }
  </code></pre>
  
  <p>Maybe there is a clever or cleaner way of doing?</p>