having trouble to load data using multiple query with different table dynamically in hibernate

20 Views Asked by At

what is the best way to get data from multiple query with different table dynamically in hibernate 6. Say for example, I have to get data from below queries from hibernate. The selection for one or more query is dynamic. What is the best way to write this using hibernate 6 as it enforce to have an entity.

select country, desc from table1;
select country, desc from table2;
select country, desc from table3;
...

Hibernate 6 is enforcing entity for each of the query, but in my case the are many tables involved. Not sure the best way to deal with this.

0

There are 0 best solutions below