[jboss-user] [EJB 3.0] - Re: Cast an SqlResultSetMapping class

rjstanford do-not-reply at jboss.com
Sat Mar 8 03:53:45 EST 2008


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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135051#4135051

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135051



More information about the jboss-user mailing list