• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple Columns Retrival in JPA  RSS feed

 
Rithanya Laxmi
Ranch Hand
Posts: 191
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!