Category: one-to-many

Symfony / php : avoid query to give nested json objects from one to many relation

I have entities; Command, User, GiftCheck, and GiftCheckType : GiftCheck <?php namespace AppEntity; use DoctrineORMMapping as ORM; /** * @ORMEntity(repositoryClass=”AppRepositoryGiftCheckRepository”) */ class GiftCheck { /** * @ORMId() * @ORMColumn(type=”integer”, length=255) *@ORMGeneratedValue(strategy=”AUTO”) */ private $id; /** * @ORMColumn(type=”string”, length=255, columnDefinition=”ENUM(‘Cadeau’, ‘Anniversaire’,…