RoleInterface has now been deprecated and is due for removal in 4.0 so you can do the same as Genoud Magloire said but be sure to extend Symfony\Component\Security\Core\Role\Role
Here is an example of my role entity.
<?php
namespace ExampleCoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Validator\Constraints as Assert;
/**
* ExampleRole
*
* @ORM\Table(name="EXAMPLE_ROLE")
* @ORM\Entity
*/
class ExampleRole extends Role
{
/**
* @var integer
*
* @ORM\Column(name="ID", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="SEQUENCE")
*/
private $id;
/**
* @var string
*
* @Assert\NotBlank()
* @Assert\Length(
* min = 9,
* max = 100,
* minMessage = "Role name must be at least {{ limit }} characters long",
* maxMessage = "Role name cannot be longer than {{ limit }} characters"
* )
* @ORM\Column(name="ROLE_NAME", type="string", length=255, nullable=false, unique=true)
*
*/
private $roleName;
/**
* @var string
*
* @Assert\NotBlank()
* @Assert\Choice({"Y","N"})
*
* @ORM\Column(name="GRANTABLE", type="string", length=1, nullable=false)
*/
private $grantable;
/**
* @var \DateTime
*
* @ORM\Column(name="CREATED_ON", type="datetime", nullable=false)
*/
private $createdOn;
//...and so on with whatever else you want to save.
public function __construct( $roleName = null )
{
parent::__construct( $roleName );
}