File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Regarding fetching query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Regarding fetching query" Watch "Regarding fetching query" New topic

Regarding fetching query

vinoth raj

Joined: Aug 04, 2008
Posts: 5
I am using user,role and rolelink table seperatley,
rolelink table links to role and user table, corresponding roleid and userid in the tables.
This is been mapped through hibernate,
I need a query to fetch the user details with corresponding roles.

is there any change we have to do in the hibernate files.

Paul Michael
Ranch Hand

Joined: Jul 02, 2001
Posts: 697
Can we have a look at your Hibernate entities?

You might want to look up the MEMBER OF and IN keywords in JPA/Hibernate for this functionality.

SCJP 1.2 (89%), SCWCD 1.3 (94%), IBM 486 (90%), SCJA Beta (96%), SCEA (91% / 77%), SCEA 5 P1 (77%), SCBCD 5 (85%)
I agree. Here's the link:
subject: Regarding fetching query
It's not a secret anymore!