For a complete understanding is not enough code to your service class and dao class (if available). In my opinion the problem is in the strategy for loading related entities (@OneToMany).
In Hibernate/JPA there are two types of strategies load related objects at once (FetchType=EAGER) or to do so only when they are accessed (FetchType=LAZY). In fact, in the case where the subject area has no complex structure of relationships between objects, the choice is already made – download pabazi for one object, as it would be if FetchType=EAGER, to put it mildly, unwise. Therefore lazy initialization in the case of collections is the most preferred strategy of initialization of related objects [https://habr.com/post/111911/].
The default connection is used OneToMany FetchType=LAZY.
So the problem with loading related objects from the database.
The code in your model, you must add annualy selecting the type of strategy download:
... @OneToMany(fetch = FetchType.LAZY) private List queryParams; ...
And in the class of service or DAO class before
... return testObject; ...
to put the line
In this case, Hibernate will load all related objects.
If you have any questions, please contact, ready to answer.