Issue #2608750 by phenaproxima, shriaas2898, KapilV, mohit_aghera, RenatoG,...
Issue #2608750 by phenaproxima, shriaas2898, KapilV, mohit_aghera, RenatoG, akhoury, guilhermevp, praveenmoses61, sulfikar_s, Abhijith S, larowlan, pameeela, Sid_omp: Exception when creating an entity reference field targeting an entity type without an ID
(cherry picked from commit 3eebb1b1)
// If the target entity type doesn't have an ID key, we cannot determine
// the target_id data type.
if(!$target_type_info->hasKey('id')){
thrownewFieldException('Entity type "'.$target_type_info->id().'" has no ID key and cannot be targeted by entity reference field "'.$field_definition->getName().'"');
$this->expectExceptionMessage('Entity type "entity_test_no_id" has no ID key and cannot be targeted by entity reference field "test_reference_field"');