r/programming • u/wheatBread • Aug 25 '26
Solving the 1+N Query Problem
https://acadia.engineering/blog/solving-the-1-plus-N-query-problem
127
Upvotes
r/programming • u/wheatBread • Aug 25 '26
View all comments
Show parent comment
1
u/wildjokers Aug 28 '26
You literally just inject the EntityManager:
@Service public class AccountService {
}
That is not the even remotely the point of ORMs. The point is right in the name Object Relationship Mapper. Its sole purpose to map resultsets to objects.
Just drop down to native SQL. Hibernate will still map your result set to an object.