better resolving of data class for entity type