Код: Выделить всё
/**
* @ORM\OneToMany(targetEntity="Product", mappedBy="sections")
*/
protected $products;
Код: Выделить всё
/**
* @ORM\OneToMany(targetEntity="Price", mappedBy="product")
*/
protected $price;
Код: Выделить всё
$sectionsarray = $this->getDoctrine()
->getRepository('AsortBundle:Sections')
->createQueryBuilder('e')
->leftJoin('e.products', 'p')
->leftJoin('e.colors', 'c')
->select('e, p, c')
->orderBy('e.sequence', 'asc')
->addOrderBy('p.kolejnosc', 'asc')
->addOrderBy('c.sequence', 'asc')
->getQuery()
->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
Подробнее здесь: https://stackoverflow.com/questions/339 ... -onetomany