added check if relation is virtual