* indexes={
* @ORM\Index(name="created_at", columns={"created_at"}),
* @ORM\Index(name="uid", columns={"uid"}),
- * @ORM\Index(name="hashed_url", columns={"hashed_url"})
+ * @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"})
* }
* )
* @ORM\HasLifecycleCallbacks()
/**
* @var string
*
- * @ORM\Column(name="hashed_url", type="string", length=32, nullable=true)
+ * @ORM\Column(name="hashed_url", type="string", length=40, nullable=true)
*/
private $hashedUrl;
public function setUrl($url)
{
$this->url = $url;
+ $this->hashedUrl = hash('sha1', $url);
return $this;
}