• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Retrieving result from a query with resultsetmapping using entity and columns

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am having some problems getting the information from a query that I did.
I specified a resultSetMapping like this:



In which I am putting the entity and an additional column that I bring in my sql query.

In my session bean I try to execute my query:



I can ensure that the information is stored in the list, I even can check the size of the list and it is correct, but I do not know
how to access the data. To which type of date can I cast the result of the query?.

I am pretty new working with resultSetMapping when combining entities with columns ... please somebody can help me out with
this problem. I have been trying and looking for examples in the forums, but I have not get anything useful.

Thanks in advance for your help.

BR
David

 
David Acevedo
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved!



In the position 0 of the obj array is the Entity and in the second is the scalar value generated by the column.

I hope this will be useful for somebody

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic