Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Columns Retrival in JPA

 
Rithanya Laxmi
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requiremnement where I need to retrieve multiple columns from the table "User" using JPQL? Like:-


select user.userName, user.password from User user where userId=?

How to do that using JPQL in java , whether multiple columns retrival result in single "User" object or Object[]? Please clarify with example.

Thanks.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic