Add filtering by relations