fixed loading of polymorphic relation when no relation is actually set to stop query without class attributes