There is a procedure and after calling the procedure, I get the result from the intermediate table. How do I convert this result to an object? Hibernate, the usual mapping in a POJO object. As an example, I have a procedure and in it I get an id, I want to display these id's in the POJO.

String userId;

String businessId;

    1 answer 1

    Look about the mapping of HP in Mkuong . If you want a specific solution, please provide the database schema and the necessary CP.

    In addition, you can use Criteria or HQL, if the CPs were chosen only to make complex queries. If the reason is in something else (for example, in the desire to improve performance, additional integrity control, etc.), then the HP will be mapped via @NamedQuery.

    Of course, in POJO, the whole set of fields is mapped, not just id.