title: Symfony validate get old value without form
body: <p>In our project we have multiple entities that are translatable (using Translatable from DoctrineBehaviors). Our users have rights on languages (or not), and if the user doesn't have rights on a language it should not update the field.</p>
  <p>As a better explaination, I got 2 entities (not completely written out but the important stuff):</p>
  <pre><code>+------------------------+
  | TranslationKey         |
  +------------------------+
  | id INT                 |
  | translationKey STRING  |
  | translations COLLECTION|
  +------------------------+
  
  +------------------------+
  | TranslationContent     |
  +------------------------+
  | id INT                 |
  | translation STRING     |
  | locale STRING          |
  +------------------------+
  </code></pre>
  <p>Basically, every user has one or multiple languages, and if the locale is in an array of the abbreviations of the user's languages, the user can edit the translation for that language.</p>
  <p>However, without having a form (for example if we'll ever start using API requests), the entity should still be validated. My idea was: create a custom validation and check if the field is edited (as when the field isn't edited, it shouldn't fail), if it is: check rights, and throw an error or revert the original value.</p>
  <p>I got this example route (just test route which won't be used in production):</p>
  <pre><code>/**
   * @Route(&quot;tuet/{translationKey}&quot;, name=&quot;tuet&quot;)
   */
  public function testUpdateEnglishTranslation(TranslationKey $translationKey, ObjectManager $em, ValidatorInterface $validator) {
      $translationKey-&gt;setTranslation('en', 'products2', $validator);
  
      $validator-&gt;validate($translationKey);
      return $this-&gt;render('base.html.twig');
  }
  </code></pre>
  <p>I added the validation class which looks like this:</p>
  <pre><code>class CanEditEnglishLanguageValidator extends ConstraintValidator {
      private $em;
  
      public function __construct(EntityManagerInterface $em) {
          $this-&gt;em = $em;
      }
  
      public function validate($object, Constraint $constraint) {
          dd($this-&gt;em-&gt;getRepository(get_class($object))-&gt;find(1)-&gt;getTranslation('en'));
      }
  }
  </code></pre>
  <p>However, for some reason - probably because the entity object is cached in Doctrine - the dd will display the <em>new</em> translation instead of the old one, however the new one is in <code>object</code>. How can I get the old value?</p>