Spring boot jpa hibernate HQL query with group by gives Validation failed for query
问题 In spring boot app I have an ElementEntity: .... @Entity public class ElementEntity { @Id int id; Double quantity; String form; String color; String type; String description; @ManyToOne @JoinColumn(name = "form") private FormEntity form; } And I have here FormEntity: @Entity public class FormEntity { ..... @OneToMany @JoinColumn(name = "links") private List<LinksEntity> links; } I want using HQL to generate a query that will sum the values of quantity field, group by color and and to return