Issue #2937782 by quietone, jofitz, yo30, heddn, Wim Leers, catch: Create trait for getDefinitionFromEntity