How to implement a DAO in JAVA to query the result sets of two entity classes at the same time
1. The picture is as follows:
Union all query of two tables. Now only one entity set result can be returned. The entity set of the other table is filtered. How to return two entities at the same time? set.
2. There are three pieces of data in the database query: as shown in the figure
3. The current one can only return one solution set, please ask for guidance.
Baidu
It seems that you need to use the createSQLQuery method. The return result is an array, not a list