Scenario In the following scenario there is reservation system of different type of housing. For all housings there is an apartment type registered, which are stored in a different table. In the overview of the reservation you want to be able to filter on apartment type and related capacity. This blog describes how to filter a gallery based on values from related entities. Database model To get a proper insight of the data structure, the database architecture looks like this: