Answer the question
In order to leave comments, you need to log in
How to implement partial JPA entity loading?
There is a JPA entity. It contains many classes that are also separate tables. The parent entity is associated with the child FetchType.EAGER. I would not want to touch the domain model, since it is used in a bunch of code and I don’t want to change it, and then something will fall off. That is, the parent entity itself is quite heavy. But the task arose of selecting only a few fields from the parent entity and some fields from the child communities (and not all of them). You can select an SQL query bypassing JPA, but then you need to implement pagination, but I would not want to lose it. If at all such a possibility?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question