namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
+use JMS\Serializer\Annotation as Serializer;
/**
* @ORM\Entity()
* @ORM\Table(name="Localisation")
+ * @Serializer\ExclusionPolicy("all")
*/
class Localisation
{
protected $id;
/**
- * @ORM\ManyToOne(targetEntity="App\Entity\Person", cascade={"all"})
+ * @ORM\ManyToOne(targetEntity="App\Entity\Person")
*/
protected $person;
/**
* @ORM\Column(type="datetime")
+ * @Serializer\Expose
*/
protected $timestamp;
/**
* @ORM\Column(type="float")
+ * @Serializer\Expose
*/
protected $latitude;
/**
* @ORM\Column(type="float")
+ * @Serializer\Expose
*/
protected $longitude;
return $this;
}
+ public function setPerson($person)
+ {
+ $this->person = $person;
+ return $this;
+ }
+
public function setTimestamp($timestamp)
{
$this->timestamp = $timestamp;