title: Symfony2 get validation constraints on an entity
body: <p>Im working on a method to get all validation constraints of an entity (what i am trying to achieve is to return this data in JSON and apply the same constraints on client side using JQuery Validation Plugin), however im having some trouble getting the constraints, 
  Here is my current code:</p>
  
  <pre><code>    $metadata = new \Symfony\Component\Validator\Mapping\ClassMetadata("Namespace\JobBundle\Entity\Job");
      $annotationloader = new AnnotationLoader(new AnnotationReader());
      $annotationloader-&gt;loadClassMetadata($metadata);
  </code></pre>
  
  <p>what i get in $metadata is an empty array for the constraints attribute, the rest ($properties and $members have only the error messages... but not the actual constraints (eg : required, integer...)).</p>
  
  <p>What im a doing wrong?</p>