On 01/10/2015 01:36 PM, Martin Nowak wrote:

The idea isn't bad, but the performance will suck. This is generally
known as N+1 query, only that this is even worse, as each field is
queried individually.

Here is a sketch for an optimal solution. I'm actually eagerly waiting
that someone finally implements it.

http://dpaste.dzfl.pl/cd375ac594cf

I also added a where clause, with a very simple expression template capture.

http://dpaste.dzfl.pl/cd375ac594cf#line-140

Reply via email to