Changed getRelatedEntities