title: Symfony manually validate entity with relation
body: <p>I want to validate a User entity with custom constraint &amp; validator. So far it's working when triggered by form workflow, but if I trigger it manually, I loose one relation I setup before calling validation : </p>
  
  <p>UserController : </p>
  
  <pre><code>$user = new User();
  $user-&gt;setRoles($roles);
  $user-&gt;setSite($site);
  ...
  
  $violations = $this-&gt;container-&gt;get('validator')-&gt;validate($user);
  </code></pre>
  
  <p>User entity with Site relation : </p>
  
  <pre><code>   /**
       * @var Site the site linked to the entity
       * @ORM\ManyToOne(targetEntity="LCH\MultisiteBundle\Entity\Site", cascade={"all"})
       * @ORM\JoinColumn(name="site_id", referencedColumnName="id", onDelete="CASCADE")
       */
      protected $site;
  </code></pre>
  
  <p>Validator :</p>
  
  <pre><code>public function validate($user, Constraint $constraint)
      {
          $email = $user-&gt;getEmail();
  
          // $site var is null while other "direct fields are filled
          $site = $user-&gt;getSite();
          $roles = $user-&gt;getRoles();
          $username = $user-&gt;getUsername();
  </code></pre>
  
  <p>How can I manually validate this entity using preceeding set relation?</p>