Forums Register Login

Multiple Columns Retrival in JPA

+Pie Number of slices to send: Send
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.
Whatever. Here's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1532 times.
Similar Threads
JPA - need help with query
Regarding JPA Select Query
Problem when execute the JPQL with Map
JPQL Query Dout
Join Fetch using EclipseLink
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:13:24.