How to filter on an optional table produced by a left join in slick
问题 I need to apply a filter on an attribute of an optional table produced by a left join in scala slick . I could not find any documentation on this or any similar questions online. Consider the following query: val query = FirstTable joinLeft SecondTable on (_.foreignId === _.id) I would like to filter is by an attribute of the SecondTable : query.filter { case (firstTable, secondTableOpt) => secondTableOpt.attribute === "value" } Obviously this does not compile since secondTableOpt is a Rep