Have BelongsToMany inherit constraints from relationship query