JPA Query Select many-to-one Query with a count
问题 So I'm trying to write a JPA query based on the classes below (dumbed down a bit) that will produce the following: So I have two objects: Thing and Person. A Person can hold a reference to a single Thing. Here are simplified version of the Classes: public class Thing { @Id public Long id; public String name; public String description; } public class Person { @Id public Long id; public String firstname; public String lastname; @ManyToOne public Thing thing; } I'm trying to write a JPA query