Symfony Hydration: Force related entities to be parsed

Add fetch=”EAGER” to your annotation…

 /**
     * @ORM\ManyToOne(targetEntity="Location", fetch="EAGER")
     * @ORM\JoinColumn(name="location", referencedColumnName="id")
     */
    private $location = null;

Leave a Reply

Your email address will not be published. Required fields are marked *