aspose file tools*
The moose likes Object Relational Mapping and the fly likes Design question Hibernate Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Design question Hibernate Query" Watch "Design question Hibernate Query" New topic
Author

Design question Hibernate Query

Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Hi!

I have a little problem that I can't find a good solution for.

I have articles in a database that have mappings to brand, Colour, Category, Gender, and many more. A web user can filter out articles by choosing the above mentioned entities from drop downlists.

If let's say a user chooses to filter by a brand only articles that is connected to that brand should be returned. My problem is that the gender drop down list, category drop down list and all other list should also be filtered.

What I meen is that I only want the distinct Categories, Brands, Gender, Colours etc from the Articles search result.

The articles search result can be up to 20.000 articles so I don't want to iterate over the result and get the distinct categories, brands etc.

Can someone point me to a solution?


SCJP1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Design question Hibernate Query