This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with query getResultList object  RSS feed

 
Milutin Markovic
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Now I have list of objects. Every object in list have Integer name and String id. How can I get Integer and String from Object



Thanks for reading, thanks for any help. I think that is not difficult but i don't know how to google that.
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you select multiple attribute values in JPQL they are returned as an Object[].

i.e.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!