public function __construct($id) { $this->id = (int) $id; $this->packages = new \Doctrine\Common\Collections\ArrayCollection(); }