This content has been marked as final.
Show 1 reply
-
1. Re: Cast an SqlResultSetMapping class
rjstanford Mar 8, 2008 3:53 AM (in response to graflaszlo)Should be something like the following:
Query q01 = createNativeQuery(queryString, "getData01"); for (Object[] arr : q01.getResultList()) { Klass01 k01 = (Klass01)arr[0]; Klass02 k02 = (Klass02)arr[1]; // business logic goes here }
When dealing with odd mappings, you can always throw your code into the debugger and check the actual return values as well, then make sure that your code is referring to the appropriate classes or interfaces.