take care of STI for scoping

take care of STI by getting the where values and adding it to
the returned relation