Issue #2960046 by amateescu, tstoeckler: Allow the table mapping to be instantiated with a custom entity type definition