diff --git a/src/Entity/Role.php b/src/Entity/Role.php index 38fcc0b2..f90efd39 100644 --- a/src/Entity/Role.php +++ b/src/Entity/Role.php @@ -6,6 +6,7 @@ use Catalyst\AuthBundle\Entity\Role as BaseRole; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; +use Symfony\Component\Validator\Constraints as Assert; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** @@ -16,6 +17,19 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; */ class Role extends BaseRole { + /** + * @ORM\Id + * @ORM\Column(type="string", length=80) + * @Assert\NotBlank() + */ + protected $id; + + /** + * @ORM\Column(type="string", length=80) + * @Assert\NotBlank() + */ + protected $name; + /** * @ORM\ManyToMany(targetEntity="User", mappedBy="roles", fetch="EXTRA_LAZY") */