spring jpa nested projection generating incorrect query
问题 Lets consider these entities @Entity public class Room{ @Id private Integer id; private String number; private String floor; @ManyToOne private RoomType roomType; // Setters & Getters } @Entity public class RoomType{ @Id private Integer id; private String name; private String description; private Boolean enabled; // Setters & Getters } And also this interface for projection alongside repository class public interface RoomList{ public Number getId(); public String getNumber(); public RoomType