add feature for applying $filter on related models