This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
Similar Threads
Mapping issue
Problem in Many to Many mapping -
Regarding Query
Getting property / column names from mapping file
Need help for Many to Many association