title: @UniqueEntity does not work for me with a simple string property
body: <p>I have a "Company" entity with three fields : id, name and slug. The name is unique.</p>
  
  <p>When I attempt to create a new Company with a name already used I get the following error : </p>
  
  <pre><code>An exception occurred while executing 'INSERT INTO companies (name, slug) VALUES (?, ?)' with params ["test", "test-1"]:
  
  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'test' for key 'UNIQ_8244AA3A5E237E06'
  </code></pre>
  
  <p>I don't know why, but the @UniqueEntity does not show my error message. I also tried to put this line : @UniqueEntity(fields={"name"}, groups={"company"})</p>
  
  <p>Here is the code of the class :</p>
  
  <pre><code>&lt;?php
  namespace Project\UserBundle\Entity;
  
  use Symfony\Component\Validator\Constraints as Assert;
  use Doctrine\Common\Collections\ArrayCollection;
  use Gedmo\Mapping\Annotation as Gedmo;
  use Doctrine\ORM\Mapping as ORM;
  use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  
  /**
   * Company
   *
   * @ORM\Table(name="companies")
   * @UniqueEntity(fields={"name"}, message="form.error.name.unique")
   * @ORM\Entity
   */
  class Company
  {
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      /**
       * @ORM\Column(type="string", length=50, unique=true)
       * @Assert\NotBlank(message="form.error.name.not_blank");
       * @Assert\Length(min="4", max="50", minMessage="form.error.name.length.min {{ limit }}", maxMessage="form.error.name.length.max {{ limit }}");
       */
      private $name;
  
      /**
       * @var string
       *
       * @ORM\Column(length=170, unique=true)
       * @Gedmo\Slug(fields={"name"})
       */
      private $slug;
  
      /**
       * @ORM\OneToMany(targetEntity="Project\UserBundle\Entity\User", mappedBy="company")
       * @Assert\Valid
       */
      private $users;
  }
  </code></pre>