Skip to content

Aggregating Collections in Projections w. Quarkus/Hibernate #39331

Closed Answered by beikov
ru4ert asked this question in Q&A
Discussion options

You must be logged in to vote

Hibernate ORM only supports creating projections (through the use of the HQL constructor syntax) of flat results i.e. on projection object per result row. To map collection associations to into sub-projections, one will have to structure flat objects into hierarchical ones.

You can use Blaze-Persistence Entity-Views for this purpose though, which does all of that for you and also allows to configure fetch strategies for such collection associations to fine tune the performance even further.

Replies: 1 comment 20 replies

Comment options

You must be logged in to vote
20 replies
@ru4ert
Comment options

@FroMage
Comment options

FroMage Mar 20, 2024
Collaborator

@yrodiere
Comment options

@beikov
Comment options

beikov Mar 20, 2024
Collaborator

Answer selected by ru4ert
@ru4ert
Comment options

@FroMage
Comment options

FroMage Mar 21, 2024
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
4 participants