• Post Reply Bookmark Topic Watch Topic
  • New Topic

Returning object, based on mapping with second table?

André-John Mas
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two tables:
- mailing_list - maps to MailingList.java
- mailing_list_subscriber - maps to MailingListSubscriber.java

I want to be able to return all mailing lists which the subscriber is a member of. For returning mailing list based on owner I have:

How would I adapt this to do what I want? Should I be using a join? Either way an example of what I should be doing would be appreciated.

Note: I am using Hibernate with persistence API.
[ November 30, 2008: Message edited by: Andr�-John Mas ]
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!