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 Design question Hibernate 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 "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
Similar Threads
Complete separation of users groups and categories?
Mutiple brand support with one web application
Selecting Multiple Options
Scan item code and store in the database
Design struts 2