Can Spring JPA projections have Collections?
问题 I have a Customer entity from which I only want to select a few fields and their associated CustomerAddresses. I've defined a Spring Data JPA projection interface as follows: public interface CustomerWithAddresses { Integer getId(); String getFirstName(); String getLastName(); String getBrandCode(); String getCustomerNumber(); Set<CustomerAddress> getCustomerAddresses(); } But from my Repository method: CustomerWithAddresses findCustomerWithAddressesById(@Param("id") Integer id); I keep