Using arbitrary query as projection in spring data rest project
问题 How it is possible to use arbitrary sql query (I mean native sql query) in some repository? My actual problem is this: @Data //lombok thing @Entity public class A extends AuditModel { private long id; private String name; @OneToMany(mappedBy="a") //Comments.a is owning side of association, i.e. comments table does have column called a_id as foreign key @ToString.Exclude private Set<Comments> comments = new HashSet(); @OneToMany(mappedBy="a") //SimpleFile.a is owning side of association