Forums / Setup & design / Multiple filters on search, good design suggestions?

Multiple filters on search, good design suggestions?

Author Message

HÃ¥vard Bell

Thursday 18 November 2004 1:56:41 pm

Hi,

We are building a web site that has a number of courses. Each course is held at a certain place, is of a certain type, and is thought by a certain person. We want to list all courses at this place, or all courses of this type, or all courses thought by this person.

For example: Course A is held in Oslo, thought by Adam, and is of type Advanced. Course B is held in New York, thought by Adam and is of type Beginner. Course A and Course B will show up on the list of courses thought by Adam. Only course A will show up on the list of courses held in Oslo, and so fourth.

Initially we have designed the object model such that each course has attributes that are object relations to place object, person object or coursetype object. The problem with this is that in one fetch statement, we cannot filter based on some values in an object related to through a related object attribute.

A solution is to fetch all courses, then we filter out what we need, manually, through a loop in the template. This feels, at least now, problematic with regards to performance if the course list is large.

Does anybody have any good suggestions on how we can solve this in the most efficient, and "eZ Publish like" way?

Thanks,

~ Hav.