I have a rather big number of classes related to each other via various relations (OneToOne, OneToMany, ManyToOne as well as Class- and Joined Inheritance which in turn again have multiple relations.
When I want to select all of a parent class via a simple ->findAll()
, I get around 10 extra queries per Entity. I can reduce this number by a limited extend by unsing the a QueryBuilder with ->leftJoin()
and ->addSelect()
. Some relations do not join because reasons. Still, it gets a pretty nasty long list of addSelect()
s. Is there a way to join and select all relations automatically?