use JMS\Serializer\Annotation\Exclude;
use JMS\Serializer\Annotation\VirtualProperty;
use JMS\Serializer\Annotation\SerializedName;
+use JMS\Serializer\Annotation\Groups;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\Entry;
* @var string
*
* @ORM\Column(name="text", type="text")
+ *
+ * @Groups({"entries_for_user", "export_all"})
*/
private $text;
* @var string
*
* @ORM\Column(name="quote", type="string")
+ *
+ * @Groups({"entries_for_user", "export_all"})
*/
private $quote;
* @var array
*
* @ORM\Column(name="ranges", type="array")
+ *
+ * @Groups({"entries_for_user", "export_all"})
*/
private $ranges;
* @Exclude
*
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Entry", inversedBy="annotations")
- * @ORM\JoinColumn(name="entry_id", referencedColumnName="id")
+ * @ORM\JoinColumn(name="entry_id", referencedColumnName="id", onDelete="cascade")
*/
private $entry;
/*
* @param User $user
*/
- public function __construct(\Wallabag\UserBundle\Entity\User $user)
+ public function __construct(User $user)
{
$this->user = $user;
}
/**
* Set user.
*
- * @param string $user
+ * @param User $user
*
* @return Annotation
*/
/**
* Get user.
*
- * @return string
+ * @return User
*/
public function getUser()
{