This is the Beginning of the End of the N+1 Problem: Introducing Single Query Loading.
TL;DR: Starting with Spring Data JDBC 3.2.0-M2, Spring Data JDBC supports Single Query Loading. Single Query Loading loads arbitrary aggregates with a single select statement. To enable Single Query Loading you need to call setSingleQueryLoadingEnabledtrue on your RelationalMappingContext. In...