aspose file tools*
The moose likes Object Relational Mapping and the fly likes Many to Many relationship Query in hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Many to Many relationship Query in hibernate" Watch "Many to Many relationship Query in hibernate" New topic
Author

Many to Many relationship Query in hibernate

Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
Hi Good People,

I am stuck in many-to-many relationship problem in Hibernate. I have the following scenario:



As you can see third table implementing M:M relationship.

Now i want to display in the UI like :

List of products along with total number of customers in each product.

I have made database query for this problem like :




after that i am unable to understand how should i map this query to any object class ?

Please suggest me if any one has any idea?

Thanks and Regards,
Khushwinder
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Many to Many relationship Query in hibernate