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 Design question Hibernate 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 "Design question Hibernate Query" Watch "Design question Hibernate Query" New topic

Design question Hibernate Query

Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367

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?

I agree. Here's the link:
subject: Design question Hibernate Query
It's not a secret anymore!