-
Notifications
You must be signed in to change notification settings - Fork 220
Open
Labels
type: improvementA minor improvement to an existing featureA minor improvement to an existing feature
Description
In hibernate, it supports a custom type as result type in some cases (with @Query or derived queries by name in the Repository interface), if the ordered name or type are matched.
record PostSummary(title, count){}
@Query("select p.title as title, count(c.id) as count from Post p left join Comment c on c.postId = p.id group by p.id")
List<PostSummary> getPostSummary();or
interface AnotherRepository extends CrudRepository<Post, UUID>{
List<PostSummary> find(Limit,Sort...)
}Metadata
Metadata
Assignees
Labels
type: improvementA minor improvement to an existing featureA minor improvement to an existing feature