Hibernate custom query containing GROUPBY and HAVING
问题 So I have two entities with a one-to-many relationship. A form_collection contains multiple form . The form contains a column version which keeps track of the most current form. form +----+-----------------+---------+--------------------+ | id | description_key | version | form_collection_id | +----+-----------------+---------+--------------------+ | 1 | desc1 | 1 | 1 | +----+-----------------+---------+--------------------+ | 2 | desc1 | 2 | 1 | +----+-----------------+---------+------------