File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extract output of CreateNativeQuery

 
Juliana Steven
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on a piece of code where the sql statement returns 2 fields. For e.g.


Now resultList is comprised of Objects. Each Object has 2 attributes namely the ids which show up on Debug as BigDecimal or type Object. I tried giving a

to access the attributes, but am unable to do so.
How do I get the value of a.id and b.id in 2 separate variables from the Object result?

Any help would be appreciated.

Thanks Much,
Juliana
 
Juliana Steven
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out. This is what I needed to do in the for loop



Now I can access my elements!
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic