title: Pimcore - get old Object state in preUpdateObject hook
body: <p>I need to compare if a certain property of my object has changed when someone is saving it. I wrote a plugin to be able to add some functionality before and after updating an object in the backend happens.</p>
  
  <p>So, I don't know if this is not working as expected or if I'm getting this wrong.</p>
  
  <p>I thought I would get the state before it is saved to the database in:</p>
  
  <pre><code>function preUpdateObject(Object_MyObject $object) {}
  </code></pre>
  
  <p>And the new state of the object in </p>
  
  <pre><code>function postUpdateObject(Object_MyObject $object) {}
  </code></pre>
  
  <p>But this doesn't work:</p>
  
  <pre><code>public function preUpdateObject(Object_MyObject $object) {
     $this-&gt;tempOldDate = $object-&gt;getUpdate();
  }
  
  public function postUpdateObject(Object_MyObject $object){
     if($this-&gt;tempOldDate-&gt;compareDate($object-&gt;getUpdate()) == -1) {
     // do something because a newer date has been entered   
     }
  }
  </code></pre>
  
  <p>Any clue how I can get the old object state BEFORE it is updated?? </p>